Skip to content
Samuel Zapolsky edited this page Feb 3, 2016 · 6 revisions

Quick start to using Pacer

Building

mkdir release; cd release;

If Ravelin and Moby are installed on your system:

cmake ..

otherwise

cmake -DMOBY_INCLUDE_DIR="/path/to/moby/include" -DMOBY_LIBRARY="/path/to/moby/lib/libMoby.so" -DMOBY_LIBRBRY_DIR="/path/to/moby/lib" -DMOBY_LIBRBRY_DIRS="/path/to/moby/lib" -DRAVELIN_INCLUDE_DIR="/path/to/ravelin/include" -DRAVELIN_LIBRARY="/path/to/ravelin/lib/libRavelin.so" -DRAVELIN_LIBRBRY_DIR="/path/to/ravelin/lib" -DRAVELIN_LIBRBRY_DIRS="/path/to/ravelin/lib" -DUSE_OSG_DISPLAY=ON -DCMAKE_BUILD_TYPE=RELEASE ..;

and then build:

make -j <cores> all

Setup

in the project base directory, run:

source setup.sh

This will point Gazebo and Pacer to the models and build directories. setup.sh sets environment vars:

  • `PACER_MODEL_PATH` points to model directories where `Pacer` will import the robot kinematic and inertial information (`Pacer` does NOT get model information from the simulator)
    
  • `PACER_COMPONENT_PATH` points to the directory where the perception, planning, and control (Component) plugins have been built.
    
  • `PACER_SIMULATOR_PATH` points to the directory where the simulator (interface) plugins have been built.
    
  • `GAZEBO_MODEL_PATH` is a `:` delimited list of paths to where the gazebo models `sdf` and their config files reside.
    
  • `GAZEBO_PLUGIN_PATH` is a `:` delimited list of paths to where the gazebo model plugins have been built, including our gazebo plugin: `libPacerGazeboPlugin.so` has been built
    

R. Links (Quadruped) Demo

remember to run:

source /build/dir/setup.sh

then navigate to the demo working directory for a trotting gait:

cd ${PACER_HOME}/Example/Demo/Trot

Write the environment paths into the demo XML files: (NOTE: this command writes filename.xml.in to filename.xml)

${PACER_SCRIPT_PATH}/setup-tests.sh *.in

starting in Moby:

then start Moby while pointing at the Pacer Moby simulator plugin:

moby-driver -r -s=0.001 -p=${PACER_SIMULATOR_PATH}/libPacerMobyPlugin.so model.xml

This will start the robot R. Links 'trotting' on a plane in the Moby simulator with visualization turned on.

starting in Gazebo: (Tested on Gazebo 5.1)

then start Gazebo while pointing at the links world file:

gazebo ${PACER_MODEL_PATH}/links/model.world

Gazebo will see that the model file ${PACER_MODEL_PATH}/links/model.sdf uses to controller libPacerGazeboPlugin.so, it will find this controller in directory ${GAZEBO_PLUGIN_PATH}/ which was exported by running setup.sh.

  • NOTE: This could be built as libPacerGazeboPlugin.dylib on an OSX system be sure to change the name of the plugin in ${PACER_MODEL_PATH}/links/model.sdf if Gazebo can't find any model plugin.

This will start the robot R. Links 'trotting' on a plane in the Gazebo simulator.

NOTE: Pacer will read the file vars.xml in the working directory on startup. This file sets parameters in all controller plugins, as well as telling Pacer which plugins to load.

Clone this wiki locally