Giter VIP home page Giter VIP logo

robot_remote_control's Introduction

CI build and test:

Main: Main Devel: Devel

Robot Remote Control

This is a library for framework independent remote control of semi-autonomous robots.

This library was initiated and is currently developed at the Robotics Innovation Center of the German Research Center for Artificial Intelligence (DFKI) in Bremen.

Motivation

Robots or semi-autonomous vehicles often use their own Framework, with it's own proprietary communication. While these are often well suited for in-system communication, they often cause trouble when those systems should be controlled by an external connection.

Those connections may also have additional requirements, like low bandwidth, high latency, etc., or custom communication hardware, which does not have an ethernet stack. This library defines an interface to those robots and supports externally programmed Transports that can handle the requirements above.

Citing

An evaluation of the library has beed published at the i-SAIRAS conference in 2020, you can find the Paper here.

If you want to cite this library you can use this bibtex entry:

@inproceedings{danter2020rrc,
    title = {Lightweight and Framework-Independent Communication Library to Support Cross-Plattform Robotic Applications and High-Latency Connections},
    booktitle = {International Symposium on Systems, Artificial Intelligence, Robotics, and Automation in Space (i-SAIRAS), 15th, October 19-23, Online-Conference},
    author = {Leon Cedric Danter and Steffen Planthaber and Alexander Dettmann and Wiebke Brinkmann and Frank Kirchner},
    year = {2020},
    url = {https://www.hou.usra.edu/meetings/isairas2020fullpapers/pdf/5063.pdf}
}

License

BSD Clause 3
- Copyright DFKI GmbH

Installation

Dependencies

The library is using the high-level networking library ZeroMQ (ZMQ) and Google's language- and platform-neutral proto3 for de-/serialization. Therefor you need to manually install the following OS dependencies: protobuf and zeromq

sudo apt install libprotobuf-dev protobuf-compiler libzmq3-dev libreadline-dev

Building

The library is compiled using cmake. To compile it manually execute the following lines from the repositories root directory:

mkdir build
cd build
cmake ..
make

Optionally you can add the flags -DBUILD_EXAMPLES=ON and -DBUILD_TESTS=ON to build the examples and test directory respectively.

Building on systems without protobuf3

In order to install protobuf3 from source you need additional dependencies:

apt-get install autoconf automake libtool curl make g++ unzip lsb-release

You can use the compile_protobuf_from_source.bash script to build protobuf from source. Optionally you can path the install destination as follows:

build_protobuf "$INSTALL_PATH"

This will install protobuf 3 in the specified INSTALL_PATH (default is /usr/local)

In case you have a system protobuf installed, defien the protobuf locations by yourself:

cmake .. -DBUILD_EXAMPLES=true -DPROTOBUF_PROTOC_EXECUTABLE=/bin/protoc -DPROTOBUF_IMPORT_DIRS=/include -DPROTOBUF_INCLUDE_DIR=/include -DPROTOBUF_LIBRARY=/lib/libprotobuf.so.28

Directory Structure

This directory structure follows some simple rules, to allow for generic build processes and simplify reuse of this project.

Folder Structure

directory purpose
src/ Contains all header (.hpp) and source (.cpp) files
build/ * The target directory for the build process, temporary content
test/ contains the boost_test based unit tests
examples/ contains demo classes to showcase usage and extensibility

Gettings started

Please have a look into the provided Main examples

  • examples/ControlledRobotMain.cpp (Robot that takes the position command and sets its position to it)
  • examples/RobotControllerMain.cpp (controller that sets the desired robot position)

You can build the Doxygen documentation using $> doxygen Doxyfile, it will be written to the build/doc folder.

There are two main libraries generated when compiling this repository:

RobotController

The RobotController class is a framework independent cpp class which is able to control any Robot/Vehicle that has a ControlledRobot library wrapped into its control framework.

ControlledRobot

This library is to be used on the robot, you can map the commands received from the RobotController Library to commands of your Robot to listen to the commands. Also you can add Telemery to this library, which are then send to the RobotController.

Transports

Transports are seperated into two directions: commands and telemetry. While commands from RobotController to ControlledRobot are getting acknowledged on retrieval, the retrieval of telemetry is not confirmed.

These Transports are given to the RobotController and ControlledRobot in their contructor and only implement an send() and receive() function. So it is easy to implement other means of connections between those by implementing the Transport.hpp interface.

Testing

The repository includes a test directory with several boost test cases. You can build this directory and the test_suite executable as follows:

mkdir build
cd build
cmake -D -DBUILD_TESTS=ON ..
make

If you always want to build the test directory as well add the following line to your CMakeLists.txt

set(BUILD_TESTS ON)

In order to run the tests you can either run all by executing (in /build/test) ./test_suite or choose a specific test with the -t flag ./test_suite -t checking_current_pose

Bug Reports

To search for bugs or report them, please use GitHubs Issue-Tracker

robot_remote_control's People

Contributors

0nel avatar ayden175 avatar bkocev avatar chhtz avatar gianlucacerilli avatar moooeeeep avatar planthaber avatar rauldg avatar ric-cave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

robot_remote_control's Issues

building error

Following the instructions in the README the build fails with this errors:

/home/matteo/Documents/robot_remote_control/src/Statistics.cpp: In member function ‘void robot_remote_control::Statistics::calculate()’:
/home/matteo/Documents/robot_remote_control/src/Statistics.cpp:52:71: error: use of ‘auto’ in lambda parameter declaration only available with ‘-std=c++14’ or ‘-std=gnu++14’
   52 |         std::for_each(stat_per_type.begin(), stat_per_type.end(), [&](auto & stat){
      |                                                                       ^~~~
/home/matteo/Documents/robot_remote_control/src/Statistics.cpp: In lambda function:
/home/matteo/Documents/robot_remote_control/src/Statistics.cpp:53:18: error: request for member ‘calculate’ in ‘stat’, which is of non-class type ‘int’
   53 |             stat.calculate(&currenttime);
      |                  ^~~~~~~~~
In file included from /usr/include/c++/9/algorithm:62,
                 from /usr/include/google/protobuf/stubs/common.h:38,
                 from /home/matteo/Documents/robot_remote_control/src/Types/RobotRemoteControl.pb.h:9,
                 from /home/matteo/Documents/robot_remote_control/src/MessageTypes.hpp:3,
                 from /home/matteo/Documents/robot_remote_control/src/Statistics.hpp:3,
                 from /home/matteo/Documents/robot_remote_control/src/Statistics.cpp:1:
/usr/include/c++/9/bits/stl_algo.h: In instantiation of ‘_Funct std::for_each(_IIter, _IIter, _Funct) [with _IIter = robot_remote_control::Statistics::Stats*; _Funct = robot_remote_control::Statistics::calculate()::<lambda(int&)>]’:
/home/matteo/Documents/robot_remote_control/src/Statistics.cpp:54:10:   required from here
/usr/include/c++/9/bits/stl_algo.h:3876:5: error: no match for call to ‘(robot_remote_control::Statistics::calculate()::<lambda(int&)>) (robot_remote_control::Statistics::Stats&)’
 3876 |  __f(*__first);
      |  ~~~^~~~~~~~~~

Using this command solves it:
cmake .. -DCMAKE_CXX_STANDARD=14
Instead of
cmake .. -DCMAKE_CXX_STANDARD=11

Optional SimpleAction behaviour is breaking Communication

In the most recent commit the following lines were added:

    /**
     * @brief if the optional initSimpleactions is called on the controlledRobot, the available actions can be requested.
     */
    robot_remote_control::SimpleActions simpleactions;
    controller.requestSimpleActions(&simpleactions);
    simpleactions.PrintDebugString();

This works fine if the ControlledRobot has called the initSimpleactions method. However it crashes with a really unspecific error, if not:

terminate called after throwing an instance of 'zmq::error_t'
  what():  Operation cannot be accomplished in current state
Aborted (core dumped)

Since the initSimpleAction is optional on the ControlledRobot side and it would be nice, if the RobotControllerMain Demo would still work or at least give a more helpful error message, I would suggest to catch the zmq to provide a more detailed error or set the availableSimpleActions to zero.

RRC builds up latency if more data than possible to transmit it generated

E.g., when trying to transmit point clouds with full resolution and frequency over WiFi, RRC seems to buffer every packet which builds up a lot of latency over time.
Very often it would make more sense to only transmit the most recent data (of course, this depends on the use case, so making it configurable would be nice -- maybe there is an option for that already?).

Support (non - video stream) camera image communication

We consider to add support for communicating data from a ROS sensor_msgs/Image or sensor_msgs/CompressedImage topic to a base::samples::frame::Frame type port.

I've had a quick look at the code. Would this be the relevant changes?

Any other hints / remarks before we start with this?

Provide example (or fully-integrated support) for dispatching multiple telemetry/command inputs of the same type to a separate topic/port at the output side.

Currently RRC seems to support only one channel of data for each data type.

There is a short entry in the docs about this, which suggests that logic could be added to decide based on frame id to which topic or port to dispatch, or add a switch to reconfigure the one-to-one mapping programmatically: https://github.com/dfki-ric/robot_remote_control/blob/master/doc/FAQ.md#how-do-i-control-different-parts-using-twist-pose-or-goto

It would be great if there was an example for the required adjustments on the sides of the robot controller, as well as the controlled robot.

If there is no fundamental opposition against it, one could maybe implement (and communicate) this notion of communication channel (or port name or topic name) for messages on the low level protocol, i.e., to prevent dropping messages of one channel, if the ring buffer gets drowned by another channel's data of the same message type. Also to enable this functionality for messages that don't have a header.

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.