PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.21k stars 13.38k forks source link

SITL with gazebo and px4 #3368

Closed alejodosr closed 8 years ago

alejodosr commented 8 years ago

Hi,

I am trying to run this SITL simulation: https://pixhawk.org/dev/ros/sitl

However, Mavros is not receiving any HEARTBEAT (no connection despite UDP IP and ports seems to be correctly mapped). Do you have any idea?

Does anyone has successfully run a SITL simulation using Gazebo and px4?

LorenzMeier commented 8 years ago

Use the guide on http://dev.px4.io instead

alejodosr commented 8 years ago

You mean this one: http://dev.px4.io/simulation-gazebo.html ? Because it seems to be incomplete, the make execution does not find the target (posix_sitl_default): make posix_sitl_default gazebo

LorenzMeier commented 8 years ago

It does work. Update your Firmware repository. I have used this today.

LorenzMeier commented 8 years ago

http://dev.px4.io/simulation-ros-interface.html

tuofeichen commented 8 years ago

Sorry, I run into the same problem. Lemme know if I missed anything,

  1. Have all dependencies installed (gazebo, ros and everything), and have roslaunch mavros px4.launch tested out with hardware (a pixhawk) and received heart beat.
  2. make posix_sitl_default gazebo: compiled and run, showed simulation window just fine
  3. roslaunch mavros px4.launch fcu_url:="udp://:14540@192.168.1.36:14557"

The mavros node doesn't get a heartbeat and the simulator constantly output a mavlink sim timeout for 10 ms.

I've tried: 1, change the url to the local host one, doesn't work

  1. change the port number to 14556, doesn't work.

Thank you so much

Best Francis

devbharat commented 8 years ago

Note: If you need gazebo included the "ROS" setup (exchange information with gazebo over ROS), then read the following. If you need to only exchange PX4 related information over ROS, then you can launch mavros on the secondary mavlink interface as mentioned in the documentation linked above.

You don't need ROS or mavros for the native gazebo sitl that you start with "make posix_sitl_default gazebo". No communication here happens over ROS here and so mavros sees no data. You should not see the "mavlink sim timeout for 10 ms" through, if both gazebo and px4 are running fine.

For running the px4 sitl with ROS, start the px4 sitl with no_sim=1,

no_sim=1 make posix_sitl_default gazebo

then it waits for sensor data from 'some' simulator on udp port. Then, if you have PX4/rotor_simulator built with mavlink_interface, you can launch it for example with such a launch file:

<launch>

    <arg name="headless" default="false"/>
    <arg name="gui" default="true"/>
    <arg name="enable_logging" default="false"/>
    <arg name="enable_ground_truth" default="true"/>
    <arg name="enable_mavlink_interface" default="true"/>
    <arg name="ns" default="iris"/>
    <arg name="log_file" default="$(arg ns)"/>
    <arg name="mavlink_bridge_url" default="udp://localhost:14553@localhost:14560" />

    <include file="$(find rotors_gazebo)/launch/iris_empty_world.launch">
        <arg name="headless" value="$(arg headless)"/>
        <arg name="gui" value="$(arg gui)"/>
        <arg name="enable_logging" value="$(arg enable_logging)" />
        <arg name="enable_ground_truth" value="$(arg enable_ground_truth)" />
        <arg name="enable_mavlink_interface" value="$(arg enable_mavlink_interface)" />
        <arg name="log_file" value="$(arg log_file)"/>
    </include>
    <include file="$(find mavros)/launch/mavlink_bridge.launch">
    <arg name="mavlink_bridge_url" value="$(arg mavlink_bridge_url)" />
    <arg name="ns" value="$(arg ns)"/>
    </include>

</launch>

This uses mavros to bridge ROS data to UDP for px4 sitl. now you can do all ROS stuff.

tuofeichen commented 8 years ago

Hi Thank you so much for the response. A couple more things if you can help out I. I still can't figure out the mavlink time out error, this is literally what I did, did you see anything wrong? Or should I redownload the Firmware from github?

Script started on Tue 26 Jan 2016 06:41:53 PM CST
]0;parallels@ubuntu: make posix_sitl_default gazebo
git submodule init
Tools/check_submodules.sh 
Git submodule config valid.
Checked NuttX submodule, correct version found
Checked Tools/gencpp submodule, correct version found
Checked Tools/genmsg submodule, correct version found
Checked Tools/jMAVSim submodule, correct version found
Checked Tools/sitl_gazebo submodule, correct version found
Checked cmake/cmake_hexagon submodule, correct version found
Checked mavlink/include/mavlink/v1.0 submodule, correct version found
Checked src/lib/DriverFramework submodule, correct version found
Checked src/lib/dspal submodule, correct version found
Checked src/lib/ecl submodule, correct version found
Checked src/lib/matrix submodule, correct version found
Checked src/modules/uavcan/libuavcan submodule, correct version found
Checked unittests/googletest submodule, correct version found
ninja -C /home/parallels/src/Firmware/build_posix_sitl_default  gazebo
ninja: Entering directory `/home/parallels/src/Firmware/build_posix_sitl_default'

[1/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/genmsg
[2/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/gencpp
[3/10] cd /home/parallels/src/Firmware && git ...pdate --recursive mavlink/include/mavlink/v1.0
[3/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/gencpp
[4/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/matrix
[4/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/genmsg
[5/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/sitl_gazebo
[5/10] cd /home/parallels/src/Firmware && git ...pdate --recursive mavlink/include/mavlink/v1.0
[6/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/ecl
[6/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/matrix
[7/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/jMAVSim
[7/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/sitl_gazebo
[8/10] cd /home/parallels/src/Firmware && git ...ule update --recursive src/lib/DriverFramework
[8/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/ecl
[9/10] cd /home/parallels/src/Firmware && git ...pdate --recursive src/modules/uavcan/libuavcan
[9/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/jMAVSim
[9/10] cd /home/parallels/src/Firmware && git ...ule update --recursive src/lib/DriverFramework
[9/10] cd /home/parallels/src/Firmware && git ...pdate --recursive src/modules/uavcan/libuavcan
[10/10] cd /home/parallels/src/Firmware && Too...arallels/src/Firmware/build_posix_sitl_default
SITL ARGS
rc_script: posix-configs/SITL/init/rcS
debugger: none
program: gazebo
model: none
build_path: /home/parallels/src/Firmware/build_posix_sitl_default
empty model, setting iris as default
-- Boost version: 1.54.0
-- Found the following Boost libraries:
--   system
--   thread
-- Configuring done
-- Generating done
-- Build files have been written to: /home/parallels/src/Firmware/Tools/sitl_gazebo/Build
make[1]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[2]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
[ 67%] Built target mav_msgs
make[3]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
[ 72%] Built target hello_world
make[3]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[3]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
[ 78%] Built target rotors_gazebo_imu_plugin
[ 83%] Built target rotors_gazebo_mavlink_interface
make[3]: Entering directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
[ 89%] Built target rotors_gazebo_controller_interface
[ 94%] Built target rotors_gazebo_motor_model
make[3]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
[100%] Built target rotors_gazebo_multirotor_base_plugin
make[2]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
make[1]: Leaving directory `/home/parallels/src/Firmware/Tools/sitl_gazebo/Build'
[init] shell id: 47067170354240
[init] task name: mainapp

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

Ready to fly.

INFO  LED::init
INFO  LED::init
INFO  Not using /dev/ttyACM0 for radio control input. Assuming joystick input via MAVLink.
INFO  Waiting for initial data on UDP. Please start the flight simulator to proceed..
Gazebo multi-robot simulator, version 6.5.1
Copyright (C) 2012-2015 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
Gazebo multi-robot simulator, version 6.5.1
Copyright (C) 2012-2015 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.211.55.7
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.211.55.7
Publishing to: motors
INFO  Sending initial controls message to simulator
dataman: Unknown restart, data manager file 'rootfs/fs/microsd/dataman' size is 103090 bytes
[Wrn] [Publisher.cc:140] Queue limit reached for topic motor_speed/0, deleting message. This warning is printed only once.
[Wrn] [Publisher.cc:140] Queue limit reached for topic motors, deleting message. This warning is printed only once.
[Wrn] [Publisher.cc:140] Queue limit reached for topic imu, deleting message. This warning is printed only once.
[Wrn] [Publisher.cc:140] Queue limit reached for topic gazebo/command/motor_speed, deleting message. This warning is printed only once.
INFO  TONE_SET_ALARM 0
INFO  GYROSIM::init
INFO  GYROSIM_gyro::init base class ret: 0
WARN  baro IOCTL 175399
Command failed, returned 1
pwm_out_sim MODE_8PWM
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
[Err] [InsertModelWidget.cc:298] Missing model.config for model "/home/parallels/src/Firmware/Tools/sitl_gaARN  mavlink sim timeout for 10 ms
31mzebo/models/rotors_description"
ARN  mavlink sim timeout for 10 ms
33m[Wrn] [ModelDatabase.cc:211] Unable to connect to model database using [//database.config]. Only locally installed models will be available.
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
[Wrn] [Publisher.cc:140] Queue limit reached for topic motor_speed/2, deleting message. WARN  mavlink sim timeout for 10 ms
This warning is printed only once.
[Wrn] [Publisher.cc:140] Queue limit reached for topic motor_speed/1, deleting message. This warning is printed only once.
[Wrn] [Publisher.cc:140] Queue limit reached for topic motor_speed/3, deleting message. This warning is printed only once.
WARN  mavlink sim timeout for 10 ms
WARN  baro IOCTL 1177633
WARN  pwm_out_sim: No valid fds
INFO  GYROSIM::_set_sample_rate 1000003 Hz
INFO  GYROSIM: Changed sample rate to 500Hz
INFO  GYROSIM::_set_sample_rate 1000003 Hz
INFO  GYROSIM: Changed sample rate to 500Hz
WARN  baro IOCTL 1179376
WARN  baro IOCTL 1179767
WARN  baro IOCTL 1181012
INFO  TONE_SET_ALARM 1
INFO  ToneAlarm::start_tune
INFO  ToneAlarm::start_note 8522
ERROR px4_task_spawn_cmd: failed to set name of thread 34 0

ERROR px4_task_spawn_cmd: failed to set name of thread 34 0

WARN  mode: 0, data rate: 2000000 B/s on udp port 14556
WARN  offboard mission init: ERROR
INFO  Setting up UDP w/port 14556
WARN  mode: 2, data rate: 2000000 B/s on udp port 14557
WARN  VDev setup for mavlink log device failed!

INFO  Setting up UDP w/port 14557
WARN  stream POSITION_TARGET_LOCAL_NED on UDP port 14556 enabled with rate 80.0 Hz
WARN  stream LOCAL_POSITION_NED on UDP port 14556 enabled with rate 80.0 Hz
WARN  stream GLOBAL_POSITION_INT on UDP port 14556 enabled with rate 80.0 Hz
WARN  stream ATTITUDE on UDP port 14556 enabled with rate 80.0 Hz
WARN  stream ATTITUDE_TARGET on UDP port 14556 enabled with rate 80.0 Hz
WARN  stream RC_CHANNELS on UDP port 14556 enabled with rate 20.0 Hz
WARN  stream HIGHRES_IMU on UDP port 14556 enabled with rate 250.0 Hz
WARN  stream OPTICAL_FLOW_RAD on UDP port 14556 enabled with rate 10.0 Hz
WARN  log buffer size: 8192 bytes
telem> [log] log dir: rootfs/fs/microsd/log/2016-01-27
WARN  sdlog2: failed setting sched params
telem> [log] start: 00_42_17.px4log
INFO  ToneAlarm::start_note 6384
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 7166
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 8522
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 6384
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 7166
pxh> INFO  ToneAlarm::start_note 8522
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 6384
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  pwm_out_sim: No valid fds
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 7166
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 6384
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 7166
INFO  ToneAlarm::start_note 6384
INFO  ToneAlarm::start_note 7166
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 6384
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 7166
WARN  mavlink sim timeout for 10 ms
INFO  ToneAlarm::start_note 6384
INFO  ToneAlarm::start_note 7166
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  init ref: lat=47.3667000, lon=8.5500000, alt=  0.0540
telem> home: 47.3667000, 8.5500000, 0.06
INFO  TONE_SET_ALARM 15
INFO  ToneAlarm::start_tune
INFO  TONE_SET_ALARM 0
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
INFO  TONE_SET_ALARM 4
INFO  ToneAlarm::start_tune
INFO  ToneAlarm::start_note 11375
INFO  ToneAlarm::start_note 11375
WARN  mavlink sim timeout for 10 ms
INFO  TONE_SET_ALARM 0
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms
WARN  mavlink sim timeout for 10 ms

Exiting..
ninja: build stopped: interrupted by user.
make: *** [posix_sitl_default] Error 2

]0;parallels@ubuntu: ~/src/Firmwareparallels:Firmware$ exit
exit

Script done on Tue 26 Jan 2016 06:42:57 PM CST

II. For using the no_sim = 1, and the launch file of rotor sim, I get the gazebo window open up with the drone, but I don't think the SITL's receiving any data from gazebo, got any idea what I did wrong?

I ran

no_sim=1 make posix_sitl_default gazebo

first, with the log below

git submodule init

Tools/check_submodules.sh 

Git submodule config valid.

Checked NuttX submodule, correct version found

Checked Tools/gencpp submodule, correct version found

Checked Tools/genmsg submodule, correct version found

Checked Tools/jMAVSim submodule, correct version found

Checked Tools/sitl_gazebo submodule, correct version found

Checked cmake/cmake_hexagon submodule, correct version found

Checked mavlink/include/mavlink/v1.0 submodule, correct version found

Checked src/lib/DriverFramework submodule, correct version found

Checked src/lib/dspal submodule, correct version found

Checked src/lib/ecl submodule, correct version found

Checked src/lib/matrix submodule, correct version found

Checked src/modules/uavcan/libuavcan submodule, correct version found

Checked unittests/googletest submodule, correct version found

ninja -C /home/parallels/src/Firmware/build_posix_sitl_default  gazebo

ninja: Entering directory `/home/parallels/src/Firmware/build_posix_sitl_default'

[1/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/genmsg
[2/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/gencpp
[3/10] cd /home/parallels/src/Firmware && git ...pdate --recursive mavlink/include/mavlink/v1.0
[3/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/gencpp
[4/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/matrix
[4/10] cd /home/parallels/src/Firmware && git ...pdate --recursive mavlink/include/mavlink/v1.0
[5/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/sitl_gazebo
[5/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/genmsg
[6/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/ecl
[6/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/matrix
[7/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/jMAVSim
[7/10] cd /home/parallels/src/Firmware && git submodule update --recursive src/lib/ecl
[8/10] cd /home/parallels/src/Firmware && git ...ule update --recursive src/lib/DriverFramework
[8/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/sitl_gazebo
[9/10] cd /home/parallels/src/Firmware && git ...pdate --recursive src/modules/uavcan/libuavcan
[9/10] cd /home/parallels/src/Firmware && git submodule update --recursive Tools/jMAVSim
[9/10] cd /home/parallels/src/Firmware && git ...ule update --recursive src/lib/DriverFramework
[9/10] cd /home/parallels/src/Firmware && git ...pdate --recursive src/modules/uavcan/libuavcan
[10/10] cd /home/parallels/src/Firmware && Too...arallels/src/Firmware/build_posix_sitl_default

SITL ARGS

rc_script: posix-configs/SITL/init/rcS

debugger: none

program: gazebo

model: none

build_path: /home/parallels/src/Firmware/build_posix_sitl_default

empty model, setting iris as default

[init] shell id: 47536256226368

[init] task name: mainapp

______  __   __    ___ 

| ___ \ \ \ / /   /   |

| |_/ /  \ V /   / /| |

|  __/   /   \  / /_| |

| |     / /^\ \ \___  |

\_|     \/   \/     |_/

Ready to fly.

INFO  LED::init

INFO  LED::init

INFO  Not using /dev/ttyACM0 for radio control input. Assuming joystick input via MAVLink.

INFO  Waiting for initial data on UDP. Please start the flight simulator to proceed..

^C

Exiting..

Killed

]0;parallels@ubuntu: ~/src/Firmwareparallels:Firmware$ exit

exit

Script done on Tue 26 Jan 2016 06:59:10 PM CST

And then, run the rotors simulator like this

roslaunch rotors_gazebo px4_sim.launch

with px4_sim.launch exactly the same as you provided and the log is below:

roslaunch rotors_gazebo px4_sim.launch 
... logging to /home/parallels/.ros/log/163b96a8-c491-11e5-9f11-001c429eb260/roslaunch-ubuntu-22316.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://ubuntu:46145/

SUMMARY
========

PARAMETERS
 * /iris/mavlink_bridge/gcs_url: udp://localhost:1...
 * /robot_description: <?xml version="1....
 * /rosdistro: indigo
 * /rosversion: 1.11.16
 * /tf_prefix: 
 * /use_sim_time: True

NODES
  /
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    spawn_iris (gazebo_ros/spawn_model)
  /iris/
    mavlink_bridge (mavros/gcs_bridge)

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

setting /run_id to 163b96a8-c491-11e5-9f11-001c429eb260
process[rosout-1]: started with pid [22347]
started core service [/rosout]
process[gazebo-2]: started with pid [22350]
process[gazebo_gui-3]: started with pid [22353]
process[spawn_iris-4]: started with pid [22359]
process[iris/mavlink_bridge-5]: started with pid [22380]
[ INFO] [1453856314.510807377]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1453856314.513966270]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
spawn_model script started
[INFO] [WallTime: 1453856315.057270] [0.000000] Loading model xml from ros parameter
[INFO] [WallTime: 1453856315.064092] [0.000000] Waiting for service /gazebo/spawn_urdf_model
[INFO] [WallTime: 1453856315.972884] [0.000000] Calling service /gazebo/spawn_urdf_model
[ INFO] [1453856316.076229950, 0.025000000]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[INFO] [WallTime: 1453856316.441446] [0.250000] Spawn status: SpawnModel: Successfully spawned model
[ INFO] [1453856316.507207347, 0.250000000]: Physics dynamic reconfigure ready.
[spawn_iris-4] process has finished cleanly
log file: /home/parallels/.ros/log/163b96a8-c491-11e5-9f11-001c429eb260/spawn_iris-4*.log
^C[iris/mavlink_bridge-5] killing on exit

The gazebo opens up but the SITL doesn't seem to react to it (still waiting for simulator to open). Any idea why is this happens?

Thank you so much.

Best Francis

julianoes commented 8 years ago

@tuofeichen Try this:

 roslaunch mavros px4.launch fcu_url:="udp://:14550@127.0.0.1:14557"
tuofeichen commented 8 years ago

Hey @julianoes Thanks, that does the trick.

tuofeichen commented 8 years ago

Hey guys, Sorry for the follow-up questions, complete noob here. I still can't quite figure out why the mavlink sim timeout warning continues to happen. I have the master node by launching the px4.launch, and initially I think it might be just I'm not sending velocity command to it, but even when I did, using a simple publisher, the drone is able to take off in gazebo but the simulator still keeps spitting out the mavlink sim timeout warning.

Any idea? Or do you guys want to see any part of my code?

Thanks

Best Tuofei

mhkabir commented 8 years ago

Your computer is too slow. You can mostly ignore the warnings.

YuYangguang commented 6 years ago

I also cannot receive any data from mavros after ran no_sim=1 make posix_sitl_default gazebo , did you solve this issue? Thank you so much. @LorenzMeier My px4 firmware version is 1.6.5 release.