robotology / gazebo-yarp-plugins

Plugins to interface Gazebo with YARP.
33 stars 48 forks source link

Fix regression after #662 #666

Closed xEnVrE closed 1 year ago

xEnVrE commented 1 year ago

Unfortunately, it seems that #662 introduced a regression in that some small but important math parts were removed.

Specifically, as the coupling laws provide results in terms of absolute angles w.r.t the palm while Gazebo operates in terms of relative angles, the following were part of the coupling handler before #662:

https://github.com/robotology/gazebo-yarp-plugins/blob/6bcccbd8e90e62fdf3597a995aa2cc7a7a62f508/plugins/controlboard/src/ControlBoardDriverCoupling.cpp#L1333

https://github.com/robotology/gazebo-yarp-plugins/blob/6bcccbd8e90e62fdf3597a995aa2cc7a7a62f508/plugins/controlboard/src/ControlBoardDriverCoupling.cpp#L1386

The -q1 and -1, respectively, are essential to make everything work right.

This PR is restoring them in the right place after the modifications introduced by #662.

cc @Nicogene @traversaro