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

Revision history [back]

You could try adding small masses and inertia values to your links. Once you do that the camera might at least flop around in response to movements of the uav, though it likely won't be stabilized.

For that you would need to set up controllers for each joint that will command them to the proper rotation that will cancel out rotation of the parent uav frame with respect to the world. ( http://gazebosim.org/tutorials/?tut=ros_control has the basics of setting up controllers )

In order to come up with the proper commands to send to the controllers you would need to look up the transform tf of the parent uav frame with the world and pull out roll pitch and yaw. A simulated imu could be added to your uav for this- I'm not sure if the standard gazebo sim imu outputs a tf directly or just raw angles- in the latter case the raw angles could be used in your camera stabilizing controller directly. Or it only outputs raw angular rates and has to be hooked up to another node that integrates those into angles.

It would be interesting to experiment with gyroscopic stabilization (put a motor and a spinning disc with a mass near the camera), but possibly the gazebo physics engine won't handle that properly.

You could try adding small masses and inertia values to your links. Once you do that the camera might at least flop around in response to movements of the uav, though it likely won't be stabilized.

For that you would need to set up controllers for each joint that will command them to the proper rotation that will cancel out rotation of the parent uav frame with respect to the world. ( http://gazebosim.org/tutorials/?tut=ros_control has the basics of setting up controllers )

In order to come up with the proper commands to send to the controllers you would need to look up the transform tf of the parent uav frame with the world and pull out roll pitch and yaw. A simulated imu could be added to your uav for this- I'm not sure if the standard gazebo sim imu outputs a tf directly or just raw angles- in the latter case the raw angles could be used in your camera stabilizing controller directly. Or it only outputs raw angular rates and has to be hooked up to another node that integrates those into angles.angles and deal with build-up of error, or use a tilt sensor instead. Or you can cheat and get the true gazebo attitude of the uav by querying gazebo directly.

It would be interesting to experiment with gyroscopic stabilization (put a motor and a spinning disc with a mass near the camera), but possibly the gazebo physics engine won't handle that properly.