Coder Social home page Coder Social logo

cyberbotics / epuck_ros2 Goto Github PK

View Code? Open in Web Editor NEW
56.0 42.0 19.0 468 KB

ROS2 node for the e-puck robot and its simulation model

Home Page: https://cyberbotics.com/doc/guide/epuck

License: Apache License 2.0

Python 20.56% CMake 6.86% C 19.40% C++ 48.12% Shell 4.08% Dockerfile 0.98%
e-puck ros ros2 simulation robotics webots robot

epuck_ros2's Introduction

E-Puck Driver for ROS2

Build Status license - apache 2.0 Version

This package adds ROS2 support for the e-puck physical robot with Pi-puck extension. Please use the following links for the instructions:

Getting Started

Make sure you followed the installation tutorial, so you have ROS2 and epuck_ros2 installed on your robot. If everything properly installed you should be able to source your ROS2 workspace:

source $HOME/ros2_ws/install/local_setup.bash

Then, launch the driver:

ros2 launch webots_ros2_epuck2 robot_launch.py

This command will activate a ROS2 node with support for all sensors and actuators available on the e-puck except the camera. We consider the camera node be heavy for device such as Raspberry Pi Zero W and therefore it is not included by default. You can activate the camera node as:

ros2 launch webots_ros2_epuck2 robot_launch.py camera:=true

Your robot should be ready now and you can check examples here.

Development

If you prefer to compile epuck_ros2 from the source you can clone the repository to your workspace:

git clone --recurse-submodules https://github.com/cyberbotics/epuck_ros2.git src/epuck_ros2

Install dependencies with rosdep:

rosdep install --from-paths src --ignore-src -r -y

Then simply build it with colcon:

colcon build

Or, if you wish to build it on your PC (that doesn't have MMAL library):

colcon build --cmake-args -DAVOID_EPUCK_CAMERA_BUILD=true

Acknowledgement

rosin_logo

Supported by ROSIN - ROS-Industrial Quality-Assured Robot Software Components.
More information: rosin-project.eu

eu_flag

This project has received funding from the European Union’s Horizon 2020
research and innovation programme under grant agreement no. 732287.

epuck_ros2's People

Contributors

davidmansolino avatar lukicdarkoo avatar sgvandijk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

epuck_ros2's Issues

Create SLAM example

SLAM will be a great demo and proof that ROS2 is well integrated with e-puck2 (LaserScan, Odometry, transformations...). Therefore, it would be nice to create a launch file with configured SLAM node and RViz2 visualisation.

I am considering slam_toolbox (https://github.com/SteveMacenski/slam_toolbox/) as it supposed to be a default ROS2 solution for SLAM.

Add LED support

There are 4 RGB LEDs (LED2, LED4, LED6, LED8) and 4 on/off LEDs (LED1, LED3, LED5 and LED7). These LEDs should be exposed as subscriptions.

I was thinking to use services instead of topics as it is done in webots_ros2_epuck2 but:

  • There is no standard, suitable, service for this usage. One should install our custom service message just to control it.
  • There is no need for the return value, LED cannot fail to turn off/on.

Therefore, webots_ros2_epuck2 should be updated accordingly as well.

pre-compiled .img location?

Where can I find the image with ros2 precompiled on it? I see references to it on the installation page, but can't seem to find the file anywhere online. I've tried cross compiling, and am getting errors related to pyparsing's version for some reason.

Would appreciate some help here, thanks!

ROS2 cross-compilation

I got a request to solve ROS2 cross-compilation issue. There are two possible solutions:

However, ROS Tooling group works on putting cross-compilation tools in Docker image (ros-tooling/cross_compile#69). From my point of view, this is the ultimate solution! A user would install our container with toolchain simply with docker pull OUR_CONTAINER, allocate a pseudo-tty (docker run -it) and run any build command at native speed. If successful, we could merge the solution with cross_compile.

A few resources to start with:

Fix camera `/image_raw` topic

Describe the Bug
Topic image_raw/compressed publishes compressed image, however, there is a problem with image_raw. In order to be published, the image has to be converted from YUV to RGB and optionally resized. Unfortunately, the GPU block for image conversion is SISO (Single Input Single Output) and therefore, GPU cannot facilitate image_raw/compressed and image_raw simultaneously. Currently, it tries to use CPU for the conversion, but this approach is CPU intensive and also, OpenCV fails to perform the conversion.

There are two possible solutions:

  • optimise conversion algorithm and use CPU or
  • allow only one of the topics to be used at the time (image_raw/compressed or image_raw ).

I would prefer the second option since it is unlikely both topics will be used simultaneously. Furthermore, using the two topics simultaneously can cause very high CPU usage.

Steps to Reproduce
Subscribe to image_raw topic

Expected behavior
User should be able to receive an image from image_raw topic.

Add support for ToF sensor

There is ToF (STM-VL53L0X) sensor on e-puck2. Messages from the sensor should be decoded and added to /scan topic. Also, new topic /distance/tof should also be created.

Cross compilation fails on cyclonedds

I use your cross-compilation setup to build ROS 2 for my RPi Zero (on its own without an E-Puck) after seeing ros-tooling/cross_compile#69 (comment). Thanks for this, it is a better solution than the current state of ros_cross_compile!

However, when following the cross-compilation instructions here, the cross-colcon-build command fails when trying to build the cyclonedds package with the following:

--- stderr: cyclonedds                                                                         
Starting >>> cyclonedds
--- stderr: cyclonedds
You have called ADD_LIBRARY for library ddsc without any source files. This typically indicates a problem with your CMakeLists.txt file
/opt/cross-pi-gcc/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libssl.so.1.1, needed by ../../../lib/libddsc.so.0.7.0, not found (try using -rpath or -rpath-link)
/opt/cross-pi-gcc/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libcrypto.so.1.1, needed by ../../../lib/libddsc.so.0.7.0, not found (try using -rpath or -rpath-link)
/opt/cross-pi-gcc/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: ../../../lib/libddsc.so.0.7.0: undefined reference to `X509_STORE_CTX_get_current_cert@OPENSSL_1_1_0'
...

followed by a further list of undefined references.

I used sshfs to mount the rootfs, both libssl.so.1.1 and libcrypto.so.1.1 are there under /home/develop/rootfs/lib/arm-linux-gnueabihf, so I'm not sure why they can't be found. Probably the ADD_LIBRARY warning has something to do with it, but I couldn't immediately figure out where that comes from.

As a workaround, for now I have just disabled building this package with:

touch src/eclipse-cyclonedds/COLCON_IGNORE

with which cross-colcon-build finishes successfully.

Implement Odometry topic to `epuck_ros2_cpp`

Package epuck_ros2_cpp should support publishing to Odometry topic. This will also include publishing dynamic transforms (odom frame to base_link frame) and static transforms (position of the sensors).

Increase publishing rate of camera raw images onboard

Camera ROS2 driver publishes raw RGB images at 3-4Hz locally even after transferring compression process on GPU. This can impact users who want to put computer vision algorithms onboard. One of the possible solutions may be to change the middleware, but it has to be investigated.

More information on this is available at:
#16 (comment)
and there is an issue on Fast RTPS:
eProsima/Fast-DDS#1107


https://www.theconstructsim.com/ros2-dds-fast-rtps-with-jaime-martin-losa/
Jaime Martin Losa mentioned two modes of Fast RTPS at 0:20, synchronous and asynchronous. Faster one, synchronous, is not default. We can try changing this.

Also, we can change the default QoS profile.


With synchronous mode and Fast RTPS I am getting the following error:

2020-04-17 13:35:09.475 [PUBLISHER Error] Data cannot be sent. It's serialized size is 921664' which exceeds the maximum payload size of '65416' and therefore ASYNCHRONOUS_PUBLISH_MODE must be used. -> Function create_new_change_with_params

for command:

FASTRTPS_DEFAULT_PROFILES_FILE=fastrtps.xml RMW_FASTRTPS_USE_QOS_FROM_XML=1 RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 run epuck_ros2_camera camera

and Fast RTPS configuration from here

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.