ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
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.