Roslaunch not connecting to the PX4 app

I was trying to follow the tutorial for interfacing ROS with PX4 and Gazebo as given here

https://dev.px4.io/en/simulation/ros_interface.html

But when I launch it using roslaunch

roslaunch px4 posix_sitl.launch

The gazebo simulator is launched. But I can’t connect to px4 app ( I can’t issue commands like “commader takeoff”)

The following is the output from the terminal when I launch it using roslaunch

SUMMARY

PARAMETERS

  • /rosdistro: kinetic
  • /rosversion: 1.12.7
  • /use_sim_time: True

NODES
/
gazebo (gazebo_ros/gzserver)
gazebo_gui (gazebo_ros/gzclient)
sitl (px4/px4)
vehicle_spawn_pcname_3423_656641890587995737 (gazebo_ros/spawn_model)

auto-starting new master
process[master]: started with pid [3434]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to a7c07744-af43-11e7-b8fd-00dbdff91f55
process[rosout-1]: started with pid [3447]
started core service [/rosout]
process[sitl-2]: started with pid [3471]
node name: sitl
data path: /home/${USER}/src/Firmware
commands file: /home/${USER}/src/Firmware/posix-configs/SITL/init/lpe/iris
18446744073709551589 WARNING: setRealtimeSched failed (not run as root?)


| ___ \ \ \ / / / |
| |/ / \ V / / /| |
| __/ / \ / /
| |
| | / /^\ \ ___ |
_| / / |_/

px4 starting.

process[gazebo-3]: started with pid [3479]
INFO  [dataman] Unkown restart, data manager file 'rootfs/fs/microsd/dataman' size is 11797680 bytes
INFO  [platforms__posix__drivers__ledsim] LED::init
INFO  [platforms__posix__drivers__ledsim] LED::init
INFO  [simulator] Waiting for initial data on UDP port 14560. Please start the flight simulator to proceed..
process[gazebo_gui-4]: started with pid [3486]
process[vehicle_spawn_pcname_3423_656641890587995737-5]: started with pid [3493]
[ INFO] [1507809077.894524167]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1507809077.895123573]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
SpawnModel script started
[ INFO] [1507809078.274633762, 0.024000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[INFO] [1507809078.314827, 0.000000]: Loading model XML from file
[INFO] [1507809078.316106, 0.000000]: Waiting for service /gazebo/spawn_sdf_model
[INFO] [1507809078.319997, 0.000000]: Calling service /gazebo/spawn_sdf_model
[INFO] [1507809078.488186, 0.162000]: Spawn status: SpawnModel: Successfully spawned entity
[ INFO] [1507809078.497784210, 0.172000000]: Physics dynamic reconfigure ready.
[vehicle_spawn_pcname_3423_656641890587995737-5] process has finished cleanly
log file: /home/${USER}/.ros/log/a7c07744-af43-11e7-b8fd-00dbdff91f55`> /vehicle_spawn_pcname_3423_656641890587995737-5*.log`

I am using Ubuntu 16.04
The Ros distro is Kinetic
Gazebo version is 7