ros-drivers / flir_ptu

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

flir ptu sim support #21

Closed athackst closed 8 years ago

athackst commented 8 years ago

Currently the flir ptu was not playing nice with simulators. I added transmissions and inertial elements for gazebo sim and visual mesh for openrave sim. I updated the CMakeLists to install the new files.

mikepurvis commented 8 years ago

Looks great, thanks for your attention to this.

At some point, it'd be great to supply a demo launcher for Gazebo that has the end-to-end of a controllable PTU, including controller/plugin setup, etc, eg: https://github.com/ros-drivers/pointgrey_camera_driver/blob/master/pointgrey_camera_description/launch/view_model.launch#L8

athackst commented 8 years ago

Yes, it works for me in gazebo. I'm still WIP on ros control working on the real hardware though. Below is the controller.yaml file I use in sim

joint_state_controller:
  type: joint_state_controller/JointStateController
  publish_rate: 50.0

ptu_pan_controller:
  type: position_controllers/JointPositionController
  joint: ptu_pan
ptu_tilt_controller:
  type: position_controllers/JointPositionController
  joint: ptu_tilt

ptu_trajectory_controller:
  type: position_controllers/JointTrajectoryController
  joints:
     - ptu_pan
     - ptu_tilt
  constraints:
      goal_time: 0.6
      stopped_velocity_tolerance: 0.05
      ptu_pan: {trajectory: 0.1, goal: 0.1}
      ptu_tilt: {trajectory: 0.1, goal: 0.1}
  stop_trajectory_duration: 0.5
  state_publish_rate:  25
  action_monitor_rate: 10