Skip to content

Basic XBotCore Example

Luca Muratore edited this page Jun 19, 2019 · 3 revisions

After the installation and the configuration of the XBotControl package as described here, a set of ready to use robot model and plugins will be available on your system.

Basic Centauro Homing Example

A starting point can be the Centauro robot, whose basic config file can be set in this way:

set_xbot_config /opt/xbot/build/install/share/xbot/configs/CentauroConfig/centauro_basic.yaml

As first thing you should run roscore:

roscore

Later on you can start the XBotCore in "dummy" mode in another terminal (more information here) in this way:

XBotCore -D

In another terminal you can use the RViZ tool to visualize the kinematic simulation of the robot by running:

rviz

and adding a "RobotModel" with the following Robot Description: xbotcore/robot_description Remind to select "world" for "Fixed Frame" in "Global Options".

This should be the visualization:

XBotCore basic example with Centauro

You are now able to command the HomingExample plugin, which will send a reference to the robot in a similar way as described in here in the XBotControl tutorial.

The plugin is easy to start thanks to a ready to use ROS service:

rosservice call /xbotcore/HomingExample_switch 1

The following command should give you back the message:

success: True
message: ''

And on RViZ you should have the Centauro moving towards required homing configuration:

XBotCore basic Centauro HomingExample

You are now able to go ahead either with:

or:

XBotControl tutorial:

Clone this wiki locally