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

Simulated quadrotor is slowly drifting on its own [closed]

asked 2012-06-22 05:53:48 -0600

SL Remy gravatar image

updated 2012-06-22 08:34:01 -0600

Hello, I've noticed that on my install (fuerte from debs, quadrotor from svn -r 403), according to the "ground truth state", the quadrotor slowly drifts when not provided with a control input.

The onboard camera confirms this motion as well.

Is this something that others have observed, or can repeat?

 roslaunch hector_quadrotor_demo outdoor_flight_gazebo.launch & 
 rostopic echo -p /ground_truth/state/pose/pose/position/z

To be clear, so far, publishing '[0.0,0.0,0.0]' '[0.0,0.0,0.0]' doesn't appear to change the outcome for me, but other non-zero control do. (still trying to clear this up)

The first seven seconds of the position data also have some interesting dynamics, which I assume are because the odom messages have not yet been published. If this is the case, is this an example of how numerical uncertainty grows in the physics engine?

Initial values of the published odometry message

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 10:44:54

Comments

Setting the linear.z attribute of the twist message to -.0049 causes neutral buoyancy (with a small bounded oscillation)

SL Remy gravatar image SL Remy  ( 2012-06-22 06:52:00 -0600 )edit

Still no answers, and none of the the xacro files, the world files, nor the launch files are providing any clues.

SL Remy gravatar image SL Remy  ( 2012-07-02 17:08:17 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2012-07-09 22:55:27 -0600

The hector_quadrotor_simple_controller plugin that controls the simulated quadrotor is currently not intended to control the absolute position of the vehicle. It realizes a velocity controller by adding more or less realistic forces and torques to the vehicle.

From that starting point it is not surprising that the quadrotor drifts slowly due to numerical inaccuracies in Gazebo's physics engine even when using noise-free ground-truth information for control and in the absence of external disturbances like wind. Most real quadrotors would also show this behavior, as it is not that easy to observe the velocity and position at least in indoor environments. If you want to control the absolute position, you can either implement your own position controller that publishes /cmd_vel or add an additional cascade to the simple controller plugin.

The hector_quadrotor_simple_controller plugin only subscribes a nav_msgs/Odometry for the vehicle's state and a sensor_msgs/Imu topic for the orientation and angular rate if the appropriate parameters are set in the URDF file. Otherwise, the true state variables from Gazebo are used for control. By default, the controller subscribes the /ground_truth/state topic published by the gazebo_ros_p3d plugin and the /raw_imu topic from the hector_gazebo_ros_imu plugin. You can try to delete these two parameters and see if that changes anything.

edit flag offensive delete link more

Comments

But (according to the urdf) there's no gravity on the base link, so with no external forces, why are the numerical inaccuracies causing drift only in the positive z direction? This effect could suggest that Gazebo/ODE might be (over)compensating for gravity. A body at rest should stay at rest...

SL Remy gravatar image SL Remy  ( 2012-07-13 19:39:56 -0600 )edit

There must be a gravity acting on the model as the controller plugin just adds the forces and moments generated by the motors. I am not aware of the exact details of Gazebo's configuration files. Why do you think gravity is disabled for the base_link?

Johannes Meyer gravatar image Johannes Meyer  ( 2012-08-14 22:55:19 -0600 )edit

hmm... maybe I misread this earlier... <turnGravityOff>false</turnGravityOff>... but in any case there have been updates to the urdf.xacro file. In about a week I should be able to update and confirm whether this drift is still happening.

SL Remy gravatar image SL Remy  ( 2012-08-16 11:28:13 -0600 )edit

It seems that updating was a very bad idea.. I did notice that there was an error message associated with conflicting "gravity turn off" so I updated ros as well and now nothing gets past rosmake

SL Remy gravatar image SL Remy  ( 2012-09-02 03:05:24 -0600 )edit

What versions of ubuntu/ros/gazebo/hector_quadrotor currently work together?

SL Remy gravatar image SL Remy  ( 2012-09-02 03:06:45 -0600 )edit

We are currently using hector_quadrotor in fuerte with simulator_gazebo 1.6.4 and in electric with simulator_gazebo 1.4.15. Note that you have to checkout the hector_quadrotor stacks from /branches/fuerte if you have upgraded to fuerte.

Johannes Meyer gravatar image Johannes Meyer  ( 2012-09-04 23:00:57 -0600 )edit

Does removing gazebo_ros_p3d plugin or imu plugin solved this problem?

Ryan_Dirgantara gravatar image Ryan_Dirgantara  ( 2018-06-08 13:02:43 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2012-06-22 05:53:48 -0600

Seen: 805 times

Last updated: Jul 09 '12