Skip to content

Latest commit

 

History

History

single_pendulum

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Run single pendulum tutorial in Gazebo

Run model in Gazebo with YARP integration

  • 1st terminal:

    yarp server
  • 2nd terminal:

    • Update the GZ_SIM_RESOURCE_PATH environment variable to point to the tutorial 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.

    gz_gui

  • 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.

    yarpmotorgui_select_part

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].

yarpmotorgui_torque

Here's an example of the final result: tutorial_video