ros-drivers / flir_ptu

ROS driver for FLIR pan-tilt units
http://wiki.ros.org/flir_ptu_driver
14 stars 37 forks source link

Add Gazebo Support #50

Closed civerachb-cpr closed 1 year ago

civerachb-cpr commented 1 year ago

Add support for controlling the PTU inside of a Gazebo simulation.

The behaviour of the simulation isn't 100% identical, but the main ROS interfaces (/joint_states and /ptu/cmd) are replicated. A pair of velocity_controllers/JointPositionControllers are used to control the pan and tilt actuators, with a simple Python node acting as a middle layer between the PID controllers' .../command topics and the Flir PTU's .../cmd topic.

The biggest difference between the simulation and the real thing is that in the simulation the velocity of the rotation cannot be controlled; the speed of rotation is governed wholly by the PID controllers implemented by the JointPositionController instances. But the angles can be set using the same ROS interface, and the PTU does move, which is the most important aspect.

civerachb-cpr commented 1 year ago

Removed WIP tag. I think this is ready for review.