Giter VIP home page Giter VIP logo

benchbot_robot_controller's Introduction

NOTE: this software is part of the BenchBot software stack, and not intended to be run in isolation. For a working BenchBot system, please install the BenchBot software stack by following the instructions here.

BenchBot Robot Controller

BenchBot project QUT Centre for Robotics Open Source Primary language License

benchbot_robot_controller

The BenchBot Robot Controller is the layer of the BenchBot software stack that handles all direct interactions with the underlying robot platform. It is designed to be run directly on the robot platform, whether that is a real robot or on the same host as a simulator. This allows optimal performance for tight control loops in actuation, like those used for moving the robot between poses. It also significantly simplifies the BenchBot Supervisor, allowing it to focus solely on HTTP communications and configurations without the burden of ROS.

Installing and running the BenchBot Robot Controller

The BenchBot robot controller is a ROS package: it contains a ROS node which communicates downstream to low-level components, a HTTP server for upstream communication, and a Python-based process manager for automated management of low-level components. The package is installed like any other ROS package:

u@pc:~$ git clone https://github.com/qcr/benchbot_robot_controller
u@pc:~$ ln -sv "$(pwd)/benchbot_robot_controller <CATKIN_WS>/src/"
u@pc:~$ cd <CATKIN_WS> && catkin_make

Once installed, the ROS node (which contains everything including the HTTP server and process manager) is run via:

u@pc:~$ rosrun benchbot_robot_controller benchbot_robot_controller

Note that configuration for the controller is not provided at runtime, it is instead provided on demand via the /configure HTTP route described below. This facilitates swapping of configurations on-the-fly where desired.

Interacting with the BenchBot Robot Controller

The BenchBot Robot Controller class defined in src/benchbot_robot_controller.py exposes a RESTful HTTP API for getting data about robot state, and managing the lifecycle of running processes for the underlying platform.

The RESTful HTTP API includes the following commands:

Request Route Response JSON Format Description
/
Hello, I am the BenchBot robot controller
Arbitrary response to confirm connection
/config/
{... current config ...}
Returns the current configuration of the controller
/config/<config>
{...  subset of config ...}
Returns a subset of the current configuration of the controller based on the name <config>
/configure
{'configuration_valid': True|False}
Updates the configuration stored by the controller. The request is expected to have the new configuration embedded in the body.
/connections/<connection>
{... connection response ...}
Calls connection named <connection>, returning the response once all callbacks are complete
/is_collided
{'is_collided': True|False}
Goes to True once the robot has collided with an obstacle (never returns to false after that point)
/is_dirty
{'is_dirty': True|False}
Goes to True once the robot has moved for the first time
/is_finished
{'is_finished': True|False}
Returns False while the task can still be continued (e.g. while there are still poses left in a passive actuation mode trajectory)
/is_running
{'is_running': True|False}
Returns True if all simulator ROS topics are alive
/next
{'next_success': True|False}
Kills any currently running simulator & starts the next simulated environment from the list provided on startup
/reset
{reset_success: True|False}
Kills the currently running simulator & restarts the same simulated environment
/restart
{restart_success: True|False}
Kills the currently running simulator & restarts the first simulated environment
/selected_environment
{'name': string, 'variant': string}
Returns the currently running environment name, and its variant. This will correspond to an entry in the list of environments provided to benchbot_run when started

benchbot_robot_controller's People

Contributors

btalb avatar david2611 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.