Git Product home page Git Product logo

xbot2_examples's Introduction

xbot2_examples

Examples for the XBot2.0 middleware

This repository containes commented examples of use for the XBot2.0 real-time middleware for robotics. The IIT-Teleop robot, a 5-dof robotic arm, is provided as testing platform.

Contents

How to build

Standard CMake workflow

  • mkdir build && cd build
  • ccmake <path-to-repo>
  • select a build type and an install folder (must be visible to the dynamic linker), type c and then g
  • make -j install

How to setup

  • make sure that the robot sdf and meshes are visible to Gazebo; for instance, you can add the following line to your .bashrc
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:<path-to-repo>/models/database
  • set the XBot2 configuration file to the provided example with set_xbot2_config <path-to-repo>/config/teleop_complete_example.yaml (note: this is optional as this information can be provided later as a command line argument)

How to run

  • load the provided .world file to Gazebo with the following command:
    gazebo <path-to-repo>/world/teleop_xbot2.world
    
    you should now see the robot inside Gazebo
  • run XBot2 with xbot2-core or xbot2-core --verbose (note: add --config <path-to-repo>/config/teleop_complete_example.yaml if you did not use the set_xbot2_config command during the setup phase)

You should now be able to (for instance)

  • get the list of loaded plugins -> rosservice call /xbotcore/get_plugin_list
  • monitor execution time -> rostopic echo /xbotcore/statistics
  • monitor joint state -> rostopic echo /xbotcore/joint_states

Running inside Docker container drawing

  • install docker and set it up so that it does not require sudo permissions
  • install nvidia container toolkit if you have an nvidia card
  • ./docker/run.sh runs the container (the first time it will also download a crazy amount of data!)
  • to spawn more bash sessions inside the same container instance, do ./docker/attach.sh
  • open three bash sessions
  • terminal #1: ./start.sh (starts roscore and gazebo)
  • terminal #2: xbot2-core (XBot2 executable)
  • terminal #3: xbot2-gui (GUI should appear)

xbot2_examples's People

Contributors

alaurenzi avatar davideantonucci avatar francescoruscelli avatar liesrock avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.