Skip to content

Examples for individual ROS2 functionalities inc. Subscribers, Publishers, Timers, Services, Parameters. ...

Notifications You must be signed in to change notification settings

figoowen2003/ros2_examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ROS2 examples

This example package is meant to explore the possibilities of ROS2 from the point of view of current ROS1 features and how the ROS1 feature translate into the new ROS2 architecture. We investigate the aspects that are currently utilized in MRS UAV System with the intention of a potential future transition.

Examples

Everything is a component. We happily nodelet everything in ROS1, so why otherwise?

  • ServiceClientExample - periodically calls a service
    • TODO retrieving result synchronously. Some solutions are available, none work for me within a component
    • TODO slow and irregular publishing (Timer-driven) with multi-threaded executor
  • PublisherExample - periodically publishes
    • TODO slow and irregular publishing (Timer-driven) with multi-threaded executor
  • ServiceServerExample - getting called, ok
  • SubscriberExample - subscribes, ok
  • TimerExample - runs multiple timers in parallel
    • TODO timer callbacks are not executed in parallel even with multi-threaded container (with multi-threaded executor)
  • ParamsExample - load params from yaml and launch file
    • param server callback is hooked up
    • TODO nested params do not work
    • TODO investigate the ros__parameters: namespace, which does not seem to be neccessary

Running the examples

./tmux/start.sh (change the sourced workspace path in tmux/session.yml)

First ROS2 impressions

  • mrs_msgs were ported to ROS2
  • ROS bridge installs, compiles, runs (scripts here)
    • TODO check performance and load with images
    • TODO check performance and load high publish rates
  • Why are most examples on still use main() when everything in ROS2 should be a component (nodelet)?
  • ComponentContainer
    • seems like the multi-threaded container (with multi-threaded executor) fails to execute callbacks (at least Timer callbacks) in parallel
    • multi-threaded composer (with multi-threaded executor) produces very uneven and slow rates of timers, Publishing is slow in Docker with MutliThreadedExecutor #1487 (December, 2020)
  • CMakeLists.txt
    • basics are fine
    • TODO building (and using) custom libraries
    • TODO building standalone executable nodelets (should be possible)
  • Launch files
    • they are in python now link
    • remapping, params, nodelets
    • TODO connecting to existing component containers (nodelet managers)
    • TODO launch prefixes (e.g., launching with GDB)
  • Subscribers - work fine, not a big difference from ROS1
    • TODO still problem with multiple callbacks in parallel?
  • Publishers - work fine, not a big difference from ROS1
  • Service client
    • it is asynchronous only!!!!
    • how to make it behave synchronously? wrapper (only in standalone node)
  • Service server - works fine
  • Timers - single timer works fine, similarly to ROS1 Timers
  • Parameters
    • basic params work from yaml and launch
    • Beware! loading an empty yaml file causes a long and criptic error. Solution: add some random unsued param.
    • TODO fix nested parameters
  • DRS - has a direct implementation in the default parameters
    • callback hooked to the external change of the parameters works
    • validation of the parameters has to be performed in our code -> we will need a custom wrapper for that, otherwise madness
    • ROS2 rqt_reconfigure is super buggy and wonky, this issue is especially hellish
      • it shows the node's parameters sometimes, seems random
  • why is the terminal output monochromatic? I want my colors back...
    • export RCUTILS_COLORIZED_OUTPUT=1
  • ROS Time
    • TODO duration, rate, sleep
  • Transformations
    • TODO
  • Tests
    • TODO
  • Pluginlib
    • TODO
  • Lifecycles (new feature)
    • TODO

About

Examples for individual ROS2 functionalities inc. Subscribers, Publishers, Timers, Services, Parameters. ...

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 58.5%
  • Python 23.9%
  • CMake 16.8%
  • Shell 0.8%