Skip to content

Quick XBotCore Start

Luca Muratore edited this page Apr 23, 2019 · 3 revisions

Quick Start

Run the XBotCore in dummy mode

Choose the configuration file (details here related to the robot you want to use.

user@user-desktop:~$ set_xbot_config $XBOT_ROOT/configs/CentauroConfig/centauro_basic.yaml  

You can check the config file you are using at anytime by running

user@user-desktop:~$ get_xbot_config

Or opening with vim:

user@user-desktop:~$ open_xbot_config

Run roscore

user@user-desktop:~$ roscore

Some available options for XBotCore

user@user-desktop:~$ XBotCore --help
XBotCore. Available options:
  -C [ --config ] arg   Path to custom config file. If not set, a default 
                        config file must be configured via set_xbot_config.
  --ch-config arg       Path to custom config file for the 
                        CommunicationHandler. If not set, the same of XBotCore 
                        is used.
  --no-ch               Do not run the CommunicationHandler
  --dont-catch          Disable catching exceptions thrown inside rt plugins 
                        init()
  --period arg          XBotCore thread period [us]
  --ch-period arg       CommunicationHandler thread period [us]
  -D [ --dummy ]        Use the dummy HAL implementation.
  -V [ --verbose ]      Verbose mode.
  --help                Shows this help message.

Running just XBotCore command with no arguments will result in loading the configuration file specified at the beginning. In alternative you may choose a custom configuration file.

Moreover the option -D will load an virtual implementation of the real robot (no communication will be established between the PC and the robot).

Run the "dummy" mode

user@user-desktop:~$ XBotCore -D

The framework provides the possibility to run not real time plugins useful for heavy computation. If you want to run the NRT plugins:

NRTDeployer

The default way to interact to the framework is the ROS but it is also possible to use other frameworks like YARP. Moreover a Web GUI allows you to interact easily and quickly to the all functionality offered.

Run the gazebo using XBotCore plugins

Run the roscore:

roscore

and lunch the gazebo simulator (make sure to previously compile the model of the robot you want to simulate and the GazeboXBotPlugin) running:

gazebo

then insert the robot manually from the model list on the left.

ROS services

You can check all the plugins loaded using:

rosservice list

To run the plugin simply:

rosservice call /xbotcore/Plugin_Name_switch 1

To stop the plugin simply:

rosservice call /xbotcore/Plugin_Name_switch 0

Create a plugin

Run the script

user@user-desktop:~$ generate_XBot_Plugin.sh MyPluginName  

This will generate a ready to use skeleton for a XBot plugin.

Clone this wiki locally