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

Update README.md #674

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions tutorial/model/forcetorque/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ This directory contains the example of a model using the `gazebo_yarp_forcetorqu
For more information on simulation of Force/Torque sensors in Gazebo Classic, see [https://classic.gazebosim.org/tutorials?tut=force_torque_sensor&cat=sensors](https://classic.gazebosim.org/tutorials?tut=force_torque_sensor&cat=sensors).


To run this example, first of all run `yarpserver` in a terminal, then make sure to have added `gazebo-yarp-plugins/tutorial/model` directory to `GAZEBO_MODEL_PATH` as documented in the "Example models" section of the `doc/embed_plugins.md` documentation and then run the world:
To run this example, first of all run `yarpserver` in a terminal, then make sure to have added `gazebo-yarp-plugins/tutorial/model` directory to `GAZEBO_MODEL_PATH` as documented in the "Example models" section of the `doc/embed_plugins.md` documentation and then run the world.

Then:
~~~
cd <gazebo-yarp-plugins-path>/tutorial/model/forcetorque
gazebo --verbose forcetorque_world.world
~~~

Expand All @@ -19,7 +22,11 @@ To list all the YARP ports open. You should see the port `/forcetorque/measures:

You can then read the measures from the the `/forcetorque/measures:o` with the command:
~~~
traversaro@IITICUBLAP257:~$ yarp read ... /forcetorque/measures:o
yarp read ... /forcetorque/measures:o
~~~

As output you should see:
~~~
[INFO] |yarp.os.Port|/tmp/port/1| Port /tmp/port/1 active at tcp://172.22.196.221:10004/
[INFO] |yarp.os.impl.PortCoreInputUnit|/tmp/port/1| Receiving input from /forcetorque/measures:o to /tmp/port/1 using tcp
() () () () () (((0.0 0.0 -98.0000000000000568434 0.0 0.0 0.0) 59.0670000000000001705)) () () () ()
Expand All @@ -33,4 +40,4 @@ traversaro@IITICUBLAP257:~$ yarp read ... /forcetorque/measures:o

There is a parenthesis with six numbers, the first three are force and the last three are torques. In this case, it is possible
to see that the force measure make sense as the weight of the link is 10 Kg, and the acceleration of gravity is 9.8, so the measure
norm on the Z axis is correctly approximately 9.8*10 = 98.0 .
norm on the Z axis is correctly approximately 9.8*10 = 98.0 .
Loading