there is a discrepancy in how control commands sent by the user are handled.
The problem arises from the fact that the control command provided by the user is utilized in the external torque calculation. However, when joint limits are reached, Gazebo does not apply this torque; instead, it clamps it. Consequently, the calculation must be modified to account for this clamping behaviour, setting the torque to zero when joint limits are reached.
Install ROS system dependencies using the command: rosdep install --from-path src --ignore-src -r -y --skip-keys libfranka.
Build and source the Catkin workspace.
Launch the Panda simulation with the command roslaunch franka_gazebo panda.launch physics:=dart use_gripper:=false.
Plot the external torque using the command: rqt_plot /franka_state_controller/franka_states/tau_ext_hat_filtered.
Start the arm effort dynamic reconfigure server with: rosrun franka_gazebo joint_effort_dynamic_reconfigure_server.py.
Launch the RQT GUI tool: rosrun rqt_gui rqt_gui -s reconfigure.
Start the joint effort controllers by running: roslaunch franka_gazebo load_arm_effort_controller.launch.
Send an effort command to panda_joint1 higher than the collision threshold (e.g., 20) and observe that the internal controller effort is added to the external torque.
[!NOTE]\
You can also use the rosrun franka_gazebo print_collision_info.py command to view information about detected collisions.
To test the fix:
You can use the test_tau_ext_bug branch to test that after #228 is merged, this issue no longer occurs.
I have identified a potential issue in the external torque calculation performed within the
franka_gazebo
package. In the current code: https://github.com/frankaemika/franka_ros/blob/d439fc7d66a3edb890eefb0fa955f6d7042cac12/franka_gazebo/src/franka_hw_sim.cpp#L682there is a discrepancy in how control commands sent by the user are handled.
The problem arises from the fact that the control command provided by the user is utilized in the external torque calculation. However, when joint limits are reached, Gazebo does not apply this torque; instead, it clamps it. Consequently, the calculation must be modified to account for this clamping behaviour, setting the torque to zero when joint limits are reached.
To address this issue, I have submitted #228.
Steps to Reproduce the Issue
To observe the issue:
rosdep install --from-path src --ignore-src -r -y --skip-keys libfranka
.roslaunch franka_gazebo panda.launch physics:=dart use_gripper:=false
.rqt_plot /franka_state_controller/franka_states/tau_ext_hat_filtered
.rosrun franka_gazebo joint_effort_dynamic_reconfigure_server.py
.rosrun rqt_gui rqt_gui -s reconfigure
.roslaunch franka_gazebo load_arm_effort_controller.launch
.panda_joint1
higher than the collision threshold (e.g.,20
) and observe that the internal controller effort is added to the external torque.To test the fix:
You can use the test_tau_ext_bug branch to test that after #228 is merged, this issue no longer occurs.
TODOs