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

JointStatePublisher does not publish efforts #883

Open
vatanaksoytezer opened this issue Jun 25, 2021 · 9 comments
Open

JointStatePublisher does not publish efforts #883

vatanaksoytezer opened this issue Jun 25, 2021 · 9 comments
Labels
bug Something isn't working

Comments

@vatanaksoytezer
Copy link

Environment

  • OS Version: Ubuntu 20.04
  • Source or binary build?
    Edifice Binary / ROS2 Foxy

Tested using both ODE and DART physics in the world file.

Description

  • Expected behavior: Joint States Publisher publishing efforts.
  • Actual behavior: Joint States Publisher (ignition::gazebo::systems::JointStatePublisher) does not publish efforts. Position and velocities look fine.

Steps to reproduce

  1. Launch any robot in ignition with ignition::gazebo::systems::JointStatePublisher plugin.
  2. Start ROS2 parameter bridge
  3. Echo /joint_states

Appreciate any insights / thoughts.

@vatanaksoytezer vatanaksoytezer added the bug Something isn't working label Jun 25, 2021
@chapulina
Copy link
Contributor

I believe we need to be able to get the torques from ign-physics first, see gazebosim/gz-physics#124.

@vatanaksoytezer
Copy link
Author

@chapulina Thanks for the fast reply! The issue seems a little inactive for some time. Is there anyway we can help this happen?

@chapulina
Copy link
Contributor

I believe the same reply applies here 😅 gazebosim/gz-sensors#25 (comment)

If you're willing to get this rolling before we get to it, you could try prototyping Gazebo classic's approach into Ignition Physics. It's not that many lines of code. We're just busy with other priorities right now.

@vatanaksoytezer
Copy link
Author

That's reasonable thanks!

@svepe
Copy link

svepe commented Oct 20, 2023

I believe this is still an issue. I have a joint with a JointController in velocity mode and this is what I get from the JointStatePublisher:

joint {
  name: "joint"
  id: 4
  parent: "first_link"
  child: "second_link"
  pose {
    position {
    }
    orientation {
      w: 1
    }
  }
  axis1 {
    xyz {
      y: 1
    }
    limit_lower: -3.14
    limit_upper: 3.14
    position: 1.216194800124363e-08
    velocity: 5.1744987370740463e-10
  }
}

I'd expect to see effort here as well or am I wrong? Changing the mode of the controller to force does not change things.

@scpeters
Copy link
Member

I believe this is still an issue. I have a joint with a JointController in velocity mode and this is what I get from the JointStatePublisher:

joint {
  name: "joint"
  id: 4
  parent: "first_link"
  child: "second_link"
  pose {
    position {
    }
    orientation {
      w: 1
    }
  }
  axis1 {
    xyz {
      y: 1
    }
    limit_lower: -3.14
    limit_upper: 3.14
    position: 1.216194800124363e-08
    velocity: 5.1744987370740463e-10
  }
}

I'd expect to see effort here as well or am I wrong? Changing the mode of the controller to force does not change things.

I see code in JointStatePublisher that copies data from any existing JointForce components into the msgs::Joint before publishing. Nothing about efforts will appear when echoing the topic if the values are precisely zero since this version of protobuf only shows non-zero values.

I think the underlying issue is that I don't see any system in gz-sim that writes data to a JointForce component.

@svepe
Copy link

svepe commented Oct 26, 2023

I think the underlying issue is that I don't see any system in gz-sim that writes data to a JointForce component.

Not sure if it is relevant, but putting a JointForceTorque sensor does show the expected forces/torques on a joint, but that's different from the effort the joint is exerting itself.

@JinbaoXiong
Copy link

Hallo, I have met the same problem. Is here any solution?

@Fixit-Davide
Copy link

I have read the discussion in gazebosim/gz-physics#143 and #952.
Any updates on this topic?
I have actually modified the file Physics.cc in order to update the components::JointForce but still I am unable to obtain the data regarding the efforts. Is this related to the physics engine that is used (i.e. Dart, Bullet, Bullet-featherstone)?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
6 participants