ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
3

Unstable hector_quadrotor above a given height [closed]

asked 2012-12-08 02:38:54 -0600

SL Remy gravatar image

updated 2012-12-11 04:00:35 -0600

Can anyone see a reason why a simulation would become unstable and subsequently crash because of the position of a robot in Gazebo? The robot in question is the hector_quadrotor and when elevated high enough it goes crazy. (See here as well.)

For reference in this is with Gazebo 1.6.16 (from ubuntu precise ros-fuerte packages)

sudo apt-get install ros-fuerte-hector-quadrotor-apps

roslaunch hector_quadrotor_demo outdoor_flight_gazebo.launch and

rostopic pub /cmd_vel geometry_msgs/Twist '[0,0,0.1]' '[0,0,0]'

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by SL Remy
close date 2013-01-30 11:23:51

Comments

I could not reproduce the problem. I assume you are using the default configuration that comes with the ubuntu packages. You can try to remove the stateTopic and imuTopic parameters from the simple controller plugin config, so that it uses pure ground truth information from gazebo for control.

Johannes Meyer gravatar image Johannes Meyer  ( 2012-12-12 10:36:46 -0600 )edit

Commenting out the stateTopic appears to have fixed the issue. Isn't the topic ground_truth/state provided by gazebo?

SL Remy gravatar image SL Remy  ( 2012-12-13 05:22:38 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-12-13 21:54:50 -0600

The simple controller plugin takes two parameters stateTopic and imuTopic, which can be used independently. These parameters are also documented here: http://www.ros.org/wiki/hector_quadrotor_controller#XML_Parameters.

If imuTopic (sensor_msgs/Imu) is set, the controller plugin subscribes to that topic and uses the orientation and angular rates within for control. The velocity and its derivation are taken from a (nav_msgs/Odometry) message on topic stateTopic. If only stateTopic is non-empty, the orientation and angular rates are also taken from the Odometry message. When one or both of the parameters are empty, the plugin uses ground truth information from the Gazebo API to control the quadrotor.

The plugin configuration provided by quadrotor_simple_controller.urdf.xacro sets stateTopic to ground_truth/state, which is published by the gazebo_ros_p3d plugin, and the imuTopic to raw_imu, which is published by the hector_gazebo_ros_imu plugin. Both plugins can add noise to make the quadrotor flight more realistic. Instead of using the ground truth state directly you can also use the hector_localization stack that implements an Extended Kalman Filter to fuse all available measurements (IMU, Magnetometer, Pressure, GPS) to a combined pose estimate which can be fed into the controller using the stateTopic parameter.

Coming back to the problem: If the quadrotor is instable when using ground_truth/state as stateTopic and stable if the parameter is empty, it seems that some messages are lost or there is too much latency between the p3d and the controller plugin. As the publisher and subscriber are running in the same process, roscpp uses intra-process links and until now I was not aware of problems with latency or dropped messages.

You could add a debug output in the GazeboQuadrotorSimpleController::StateCallback() method to check latency (by comparing the timestamp with Gazebo's current SimTime) and if messages get lost (by looking at the seq number).

Note that the GazeboQuadrotorSimpleController plugin has been moved back from package hector_quadrotor_controller to package hector_quadrotor_gazebo_plugins in the SVN trunk recently.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-12-08 02:38:54 -0600

Seen: 647 times

Last updated: Dec 13 '12