fix behavior for multi-turn revolute joints#264
fix behavior for multi-turn revolute joints#264codebot wants to merge 1 commit intoros-controls:kinetic-develfrom
Conversation
Previously, the behavior of revolute joints was unexpected when the joint limits extended beyond [-pi, pi] due to unwrapping happening in a few places in the angles package, which was called from the joint position controller. This PR checks to see if the range of motion extends beyond [-pi, pi] and, if so, goes directly to the (clamped) target, rather than trying to unwrap the current or target angles to find the shortest path.
|
Hello, Could you show me a situation where the behavior is unexpected? Thanks |
|
@codebot @graiola I've experienced the same issue within the default_robot_hw_sim interface from gazebo_ros_control: Rather than fixing it here, shouldn't we just modify the angles |
|
We love test driven development here. (I also like Sawyer ;))
Could you please add a test that replicates this? An alternative version of
rrbot could work.
…On Tue, Apr 24, 2018, 16:53 Ian McMahon ***@***.***> wrote:
@codebot <https://github.com/codebot> @graiola
<https://github.com/graiola> I've experienced the same issue within the
default_robot_hw_sim interface from gazebo_ros_control:
https://github.com/ros-simulation/gazebo_ros_pkgs/blob/kinetic-devel/gazebo_ros_control/src/default_robot_hw_sim.cpp#L338-L342
Any measured angle from Gazebo that is outside of -pi to pi is forced to
be within that range. This is a problem for Sawyer, as the seventh joint
has a range -4.15 to 4.15 rad. I can handle fixing Sawyer, but we should
address this for the larger community.
Rather than fixing it here, shouldn't we just modify the angles
shortest_angular_distance_with_limits
<https://github.com/ros/angles/blob/master/angles/include/angles/angles.h#L215>
to handle larger joint limits properly?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#264 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADXH4asEUDK3vgJ15idkqB7I_9jJj9sTks5tr0qGgaJpZM4M2QTy>
.
|
|
@bmagyar hmm, on further investigation, I'm experiencing the joint limits being reported directly from Gazebo7 as being truncated to a reduced range. That doesn't mean that the shortest_angular_distance_with_limits is correct, but rather that this whole thing requires more investigation. I'll add more color (and possibly unit tests) to this as I grok the underlying issue better. |
Previously, the behavior of revolute joints was unexpected when
the joint limits extended beyond [-pi, pi] due to unwrapping
happening in a few places in the angles package, which was called
from the joint position controller. This PR checks to see if the
range of motion extends beyond [-pi, pi] and, if so, goes directly
to the (clamped) target, rather than trying to unwrap the current
or target angles to find the shortest path.