[bug] Incorrect external torque calculation in `franka_gazebo`
Opened this issue · 0 comments
I have identified a potential issue in the external torque calculation performed within the franka_gazebo
package. In the current code:
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.
To address this issue, I have submitted #228.
Steps to Reproduce the Issue
To observe the issue:
- Clone the rickstaa/franka_ros/show_tau_ext_bug branch.
- 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.
TODOs
- Merge the pull request at #228 to address this issue.