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 Rotation Error #15

Closed RoboEvangelist closed 9 years ago

RoboEvangelist commented 9 years ago

Hi,

There is a discrepancy between the rviz/urdf model and current sensor. If I tell the sensor to move to 0.6 position, the physical sensor moves in the correct direction, but the rviz model moves in the opposity direction. I have issues only with the pan...tilt is fine.

I have a PTU46-70.

Where do I correct this issue, in the URDF, or in the driver.h/cpp?

By the way, that is the default behaviour without me modifying anything on the driver side

Thanks

mikepurvis commented 9 years ago

Hmm. We've already reversed the pan joint once before (390d6ac1cd80a53eb77107db4816adbd37fe056c), however I'm wondering if 598c46f4b55a95b8231182bb04a0e3e4efa0d94c messed things up. The conversation on the commit indicates that it wasn't checked against the hardware.

If you're willing to fix the URDF, and verify that it does the right thing with your hardware, I will merge a PR.

RoboEvangelist commented 9 years ago

ok, let me try to fix it

RoboEvangelist commented 9 years ago

These are the values that work for me:

<joint name="${name}_pan" type="revolute">
  <parent link="${name}_pan_link" />
  <origin xyz="0 0 0.066" rpy="-1.5708 0 0" />
  <child link="${name}_tilt_link" />
  <axis xyz="0 -1 0" rpy="3.14159 0 0" />      <------------------------ These values
  <limit lower="${pan_range}" upper="${-pan_range}"
         effort="${joint_effort}" velocity="${pan_velocity}" />
</joint>
jeff-o commented 9 years ago

RoboEvangelist's fix worked for me.

mikepurvis commented 9 years ago

Committed in 284151a39c2c0eacbcb22d71c6017d6ed3c31077, please verify.