RethinkRobotics / sawyer_simulator

Gazebo Simulation interface for the Sawyer Robot
http://sdk.rethinkrobotics.com/intera/Gazebo_Tutorial
Apache License 2.0
51 stars 64 forks source link

Add noetic fixes #52

Closed AdrianZw closed 1 year ago

AdrianZw commented 3 years ago

In ROS-Noetic, the Sawyer Simulation and the pick-and-place-example, was not properly working. Three major contributions in this pull request.

  1. The head_interface.cpp use a deprecated OpenCV flag, which was updated.
  2. The KDL FK and IK solver where not properly initialized. Most likely due to a not properly implemented move constructor in KDL::Chain leading e.g. ChainFkSolverPos_recursiveto return a dimension mismatch error (-4). Hence, as a workaround, std::unique_ptr<KDL::Chain> is used in the Kinematics struct rather than the KDL::Chain attribute.
  3. In the pick-and-place example, ik_pick_and_place_demo.py, the IK service failed to find solutions. The root cause was the linear interpolation of the quaternions. Therefore, the Slerp interpolation is used for quaternions which seems to resolve the issue.
  4. Some minor fixes, required for Noetic (linking of yaml) and catching exceptions as e in Python 3.

Finally, I would like to point out that these fixes should also be tested in ROS-Melodic and ROS-Kinetic.