Skip to content

Subscribe to a ROS2 Pendulum statistics topic and store the messages in a JSON file

License

Notifications You must be signed in to change notification settings

MasterERTS/ros2_realtime_statistics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Say Thanks Contributors Forks Stargazers Issues HitCount MIT License LinkedIn

ROS2 JSON

Subscribe to ROS2 realtime statistics topics and manipulate the data.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

About the Project

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.

Installation

RT Pendulum Demo

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

RealTime Statistics

$ 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

Run

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.

Roadmap

See the open issues for a list of proposed features (and known issues).

Contribute

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)

Contribute on proposed features

  1. Choose any open issue from here.
  2. Comment on the issue: Can I work on this? and get assigned.
  3. 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:

  1. 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.

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Erwin Lejeune - @spida_rwin - [email protected] Sampreet Sarkar - [email protected]

Contributors

About

Subscribe to a ROS2 Pendulum statistics topic and store the messages in a JSON file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published