-
1st terminal:
yarp server
-
2nd terminal:
-
Update the
GZ_SIM_RESOURCE_PATH
environment variable to point to thetutorial
folder:export GZ_SIM_RESOURCE_PATH = $GZ_SIM_RESOURCE_PATH:<path-to-tutorial-folder>
-
Then, launch Gazebo:
cd <path-to-tutorial-folder>/single_pendulum gz sim single_pendulum_world.sdf
The Gazebo GUI will open and the single pendulum should be already spawned in the scene.
-
-
3rd terminal:
cd tutorial/single_pendulum yarpmotorgui
The yarpmotorgui interface will open and it should automatically prompt you to select the
/singlePendulumGazebo/body
part.Click Ok.
Finally start the simulation in Gazebo (click on the Play button on the bottom left). The pendulum will start to swing freely since the default control mode is Idle.
Click on Idle and select Torque. A slider will appear on which it is possible to manually set the reference torque [Nm].
Here's an example of the final result: tutorial_video