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] Computation of F_ext seems to be wrong in simulation. #197

Closed
JohannesPankert opened this issue Nov 9, 2021 · 3 comments
Closed
Assignees

Comments

@JohannesPankert
Copy link

When starting the simulation with the command provided in the tutorial, a large external wrench is reported when the robot is not in contact.

Launch command:

roslaunch franka_gazebo panda.launch x:=-0.5 \
    world:=$(rospack find franka_gazebo)/world/stone.sdf \
    controller:=cartesian_impedance_example_controller \
    rviz:=true

Measured wrench:

rostopic echo /panda/franka_state_controller/F_ext
...
header: 
  seq: 207
  stamp: 
    secs: 7
    nsecs:  78000000
  frame_id: "panda_K"
wrench: 
  force: 
    x: 15.404927762579728
    y: 0.12111203520518202
    z: 34.97186307726185
  torque: 
    x: -0.7130799816326103
    y: -5.507311471991857
    z: 0.03923425854899071

The measured wrench changes when the robot is in contact with the environment.
The cartesian_impedance_example_controller works fine and has no visible tracking error. After calling the set_load service and attaching a fake mass to the robot, the controller has a tracking error, and F_ext changes as well

@gollth
Copy link
Contributor

gollth commented Nov 9, 2021

Hi @JohannesPankert,

thanks for the report. The whole issue might be related to Gazebo Joints Move by Themselves. The potentially bugged implementation of Gazebo's GetForceTorque() function will also mess up the calculation of F_ext.

It seems that the cartesian_impedance_example_controller is "strong" enough to cope with this error.

We keep investigating the issue, however, because of the intricacy of the bug, there is no estimate how long that will take. Sorry

@JohannesPankert
Copy link
Author

JohannesPankert commented Nov 9, 2021

Hi @gollth,
I investigated the problem a bit more and I found the issue.
There is a problem in the calculation of the external torques in the gazebo plugin. The joint commands coming from the controller are gravity compensated but the measured torques in gazebo are not.
I propose the following fix that solves the issue for me: #198

@gollth gollth self-assigned this Feb 3, 2022
@gollth
Copy link
Contributor

gollth commented Feb 17, 2022

Fixed in #198

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

2 participants