Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Incorrect external torque calculation in franka_gazebo #364

Open
1 task
rickstaa opened this issue Sep 1, 2023 · 0 comments
Open
1 task

[bug] Incorrect external torque calculation in franka_gazebo #364

rickstaa opened this issue Sep 1, 2023 · 0 comments

Comments

@rickstaa
Copy link
Contributor

rickstaa commented Sep 1, 2023

I have identified a potential issue in the external torque calculation performed within the franka_gazebo package. In the current code:

double tau_ext = joint->effort - joint->command + joint->gravity;

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:

  1. Clone the rickstaa/franka_ros/show_tau_ext_bug branch.
  2. Install ROS system dependencies using the command: rosdep install --from-path src --ignore-src -r -y --skip-keys libfranka.
  3. Build and source the Catkin workspace.
  4. Launch the Panda simulation with the command roslaunch franka_gazebo panda.launch physics:=dart use_gripper:=false.
  5. Plot the external torque using the command: rqt_plot /franka_state_controller/franka_states/tau_ext_hat_filtered.
  6. Start the arm effort dynamic reconfigure server with: rosrun franka_gazebo joint_effort_dynamic_reconfigure_server.py.
  7. Launch the RQT GUI tool: rosrun rqt_gui rqt_gui -s reconfigure.
  8. Start the joint effort controllers by running: roslaunch franka_gazebo load_arm_effort_controller.launch.
  9. 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

@rickstaa rickstaa changed the title Incorrect external torque calculation in franka_gazebo [bug] Incorrect external torque calculation in franka_gazebo Sep 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant