Subscribe to ROS2 realtime statistics topics and manipulate the data.
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
This project aims at delivering a package which is capable of subscribing to a ROS2 topic and store the messages passed through the topic in JSON format. The resultant JSON file can be used for better visualization of data, using plots or charts. This is particularly useful in the logging and analysis of real-time data, especially monitoring the context switches, and use of shared resouces.
First, get and set the pendulum package here : https://github.com/ros2-realtime-demo/pendulum
$ source /opt/ros/eloquent/setup.bash
$ mkdir -p ~/pendulum_ws/src
$ cd ~/pendulum_ws/src
$ git clone https://github.com/ros2-realtime-demo/pendulum
$ cd ~/pendulum_ws
$ sudo rosdep init
$ rosdep update
$ rosdep install -q -y --from-paths src --ignore-src --rosdistro eloquent
$ colcon build --merge-install # OR colcon build --symlink-install
Then try and run some of these : https://github.com/ros2-realtime-demo/pendulum/blob/eloquent/docs/real_time_tutorial.md
$ mkdir -p ~/rt_stats_ws
$ git clone https://github.com/MasterERTS/ros2_realtime_statistics.git
$ colcon build --symlink-install
$ . install/setup.bash # or setup.zsh if on zsh
Terminal 1 :
$ cd ~/pendulum_ws
$ . install/setup.bash
$ ros2 run pendulum_demo pendulum_demo --priority 80 --pub-stats
Terminal 2 :
$ cd ~/pendulum_ws
$ install/setup.bash
$ ros2 run pendulum_manager pendulum_manager
press 0 to activate all nodes
Terminal 3 :
$ cd ~/rt_stats_ws
$ . install/setup.bash
$ ros2 run realtime_statistics write_json --time 30
--time is a required argument, its value is an int (time simulated in seconds)
Terminal 4 :
$ cd ~/rt_stats_ws
$ . install/setup.bash
$ ros2 run realtime_statistics plot_json --mode "both" --plot "both"
--mode takes "driver", "controller" and "both" as accepted values. It plots the corresponding data set.
--plot takes "rt", "nrt" and "both" as accepted values. It plots the RT dataset, the NRT dataset or compares both.
See the open issues for a list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. (please help)
- Choose any open issue from here.
- Comment on the issue:
Can I work on this?
and get assigned. - Make changes to your
Fork
and send a PR.
Otherwise just create the issue yourself, and we'll discuss and assign you to it if serves the project !
To create a PR:
Follow the given link to make a successful and valid PR: https://help.github.com/articles/creating-a-pull-request/
To send a PR, follow these rules carefully, otherwise your PR will be closed:
- Make PR title in this formats:
Fixes #IssueNo : Name of Issue
Feature #IssueNo : Name of Issue
Enhancement #IssueNo : Name of Issue
According to what type of issue you believe it is.
For any doubts related to the issues, i.e., to understand the issue better etc, comment down your queries on the respective issue.
Distributed under the MIT License. See LICENSE
for more information.
Erwin Lejeune - @spida_rwin - [email protected] Sampreet Sarkar - [email protected]