ros-industrial / staubli_val3_driver

ROS-Industrial (simple message) driver for Stäubli CS8 and CS9 robot controllers (VAL 3 application)
Apache License 2.0
26 stars 21 forks source link

interpolateVel: velocity smoother does not appear to work correctly #18

Open gavanderhoorn opened 4 years ago

gavanderhoorn commented 4 years ago

@gavanderhoorn wrote in https://github.com/ros-industrial/staubli_val3_driver/issues/16#issuecomment-601833239:

I'm also slightly confused how that conditional is supposed to work, as mDesc.vel is updated here:

https://github.com/ros-industrial/staubli_val3_driver/blob/17fd14a7b07e17e9c081ab2b033a2f94031f1332/staubli_val3_driver/val3/ros_server/pushMotion.pgx#L42

to contain a percentage (ie: int) and no longer the float we transmit in the simple message msg. The check in the motionControl task (which calls interpolateVel(..)) checks for mDesc.vel == 0.1, which can never be true if I understand things correctly.

The conditional is here:

https://github.com/ros-industrial/staubli_val3_driver/blob/17fd14a7b07e17e9c081ab2b033a2f94031f1332/staubli_val3_driver/val3/ros_server/interpolateVel.pgx#L14-L17

As noted in the quote above: mDesc.vel isn't actually between (0, 1] here any more, but is converted to a percentage (ie: (0, 100]). As such, the condition will never be true, causing the quoted code snippet to never actually be executed.

gavanderhoorn commented 4 years ago

@marshallpowell97: could you take a look?

Perhaps the approach taken in interpolateVel could be changed?