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

Joint force-torque sensor #25

Closed
chapulina opened this issue May 29, 2020 · 15 comments · Fixed by #144
Closed

Joint force-torque sensor #25

chapulina opened this issue May 29, 2020 · 15 comments · Fixed by #144
Labels
close the gap Features from Gazebo-classic enhancement New feature or request

Comments

@chapulina
Copy link
Contributor

We should port Gazebo-classic's ForceTorqueSensor to Ignition. That sensor attaches to a joint and publishes force/torque data to a topic. The Force/Torque Sensor tutorial provides a lot of context.

@chapulina chapulina added enhancement New feature or request close the gap Features from Gazebo-classic labels May 29, 2020
@nlamprian
Copy link

I thought I'd give this a go, but I need some help configuring the workspace, given that the sdf class for the force-torque sensor is in sdformat11.

I assume I target Edifice. I check out the relevant versions, or main if the branches do not exist yet. Then the sdformat dependencies (in ign-sensors, ign-physics, and ign-gazebo) must be bumped up. At this point I get errors

/home/nlamprian/ignition_master_ws/src/ign-gazebo/src/Conversions.cc:284:52: error: ‘const class sdf::v11::Material’ has no member named ‘FilePath’
  284 |           asFullPath(workflow->MetalnessMap(), _in.FilePath()));

which means sdformat master needs to be updated (d03dba22e).

Am I approaching this correctly? And who deals with it?

@chapulina
Copy link
Contributor Author

the sdf class for the force-torque sensor is in sdformat11.
I assume I target Edifice.

Yeah that's the eventual correct combination, but as you noticed, we're currently pending the upgrade to SDF11 for the entire stack, tracked here: gazebo-tooling/release-tools#360.

Until then, the quickest solution could be to backport gazebosim/sdformat#393 to sdf10 so that you can work with that until we bump to SDF11. CC @azeey

@chapulina
Copy link
Contributor Author

we're currently pending the upgrade to SDF11 for the entire stack

The main branch is already depending on SDF 11

@keyan
Copy link

keyan commented Mar 9, 2021

Now that gazebosim/sdformat#393 has been merged, what work is remaining to resolve this issue?

@chapulina
Copy link
Contributor Author

what work is remaining to resolve this issue?

I think it's useful to look at how other sensors are implemented throughout the stack. For example, see the IMU. You should need to:

  • Add a ForceTorqueSensor to ign-sensors
  • On ign-gazebo:
    • Add a ForceTorqueSensor component
    • Add a force_torque_sensor_system

Also add the necessary code to hook it all up, as well as tests.

@diegoferigo
Copy link

Is there any missing physics feature in the DART plugin that blocks the support of F/T sensors?

@chapulina
Copy link
Contributor Author

Leaving a cross reference to gazebosim/gz-physics#143, which seems to be exposing the necessary data from DART through ign-physics, but hasn't been merged because it's computationally expensive.

@vatanaksoytezer
Copy link

@chapulina to my understanding this is currently blocked by gazebosim/gz-physics#143. We want to use F/T sensors in ignition, and willing to contribute to get them ported. Can you give some key points / a roadmap for us to look to get this ported?

@chapulina
Copy link
Contributor Author

Can you give some key points / a roadmap for us to look to get this ported?

We're currently planning to evaluate the DART implementation on Gazebo-classic, which is faster, but less precise, see discussion in gazebosim/gz-physics#124 and gazebosim/gazebo-classic#1321. If that turns out to be unsatisfactory, we'll keep iterating on gazebosim/gz-physics#143.

@rickstaa
Copy link

rickstaa commented Dec 1, 2021

Judging from the comments above, it seems that the force-torque sensor is not yet available in the ignition. Is this still the case, or has the `force_torque sensor already been released? I saw that it is included in both the v6.0.0 source and binary releases of Oct 2, but I am unable to find the right syntax to use it. I have tried to use the syntaxes to include the plugin:

<plugin filename="libignition-sensors6-force_torque" name="ignition::sensors::ForceTorqueSensor">
</plugin>
<plugin filename="libignition-sensors6-force_torque.so" name="ignition::sensors::ForceTorqueSensor">
</plugin>
<plugin filename="libignition-sensors6-force_torque" name="ignition::sensors::ForceTorqueSensorPrivate">
</plugin>
<plugin filename="libignition-sensors6-force_torque.so" name="ignition::sensors::ForceTorqueSensorPrivate">
</plugin>

With all of them I, however, keep receiving the following error:

[Err] [SystemLoader.cc:66] Failed to load system plugin [ignition-gazebo-force-torque-system] : couldn't find shared library.

I have installed the binary of ignition-fortress according to the documentation.

@vatanaksoytezer
Copy link

vatanaksoytezer commented Dec 1, 2021

I have been using FT sensors since 6.0.0 without any problems, with source and binary. Here is what it looks like in robot xacro:

  <gazebo reference="${prefix}_joint">
    <sensor name="force_torque_sensor" type="force_torque">
      <always_on>true</always_on>
      <update_rate>50</update_rate>
      <visualize>true</visualize>
      <topic>${prefix}_joint/force_torque</topic>
      <force_torque>
        <frame>sensor</frame>
        <measure_direction>parent_to_child</measure_direction>
      </force_torque>
    </sensor>
  </gazebo>

and I have the following added in the world (sdf) file:

<!-- FT Plugin -->
<plugin
  filename="ignition-gazebo-forcetorque-system"
  name="ignition::gazebo::systems::ForceTorque">
</plugin>

If these don't work please make sure and verify you are using version number greater than 6 with ign gazebo --version

@rickstaa
Copy link

rickstaa commented Dec 1, 2021

@vatanaksoytezer Thanks for the fast response! It was indeed a naming problem. I suspected the shared library name to be equal to the one shown when running the ldconfig -p | grep libignition-sensors6-force command (i.e. libignition-sensors6-force_torque.so). I think the proposal made in #103 would remove this confusion.

@chapulina
Copy link
Contributor Author

Oh we can close this!

@vbalaji21
Copy link

Does the visualisation work in F/T sensor ? I am trying it and unable to see it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
close the gap Features from Gazebo-classic enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants