All Projects → tdenewiler → node_example

tdenewiler / node_example

Licence: BSD-3-Clause license
ROS node examples with parameter server, dynamic reconfigure, timers, and custom messages for C++ and Python.

Programming Languages

C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
Dockerfile
14818 projects
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to node example

Setup Php
GitHub action to set up PHP with extensions, php.ini configuration, coverage drivers, and various tools.
Stars: ✭ 1,945 (+2061.11%)
Mutual labels:  continuous-integration, code-coverage
cpp14-project-template
A simple, cross-platform, and continuously integrated C++14 project template
Stars: ✭ 64 (-28.89%)
Mutual labels:  continuous-integration, code-coverage
SASensorProcessing
ROS node to create pointcloud out of stereo images from the KITTI Vision Benchmark Suite
Stars: ✭ 26 (-71.11%)
Mutual labels:  ros, ros-node
Industrial ci
Easy continuous integration repository for ROS repositories
Stars: ✭ 146 (+62.22%)
Mutual labels:  continuous-integration, ros
Modern Cpp Template
A template for modern C++ projects using CMake, Clang-Format, CI, unit testing and more, with support for downstream inclusion.
Stars: ✭ 690 (+666.67%)
Mutual labels:  continuous-integration, code-coverage
marvel-jarvig
Marvel JARVIG (Just A Rather Very Interesting Game) is a game that lets you find and discover Marvel Comics characters based on their name, image and description!
Stars: ✭ 13 (-85.56%)
Mutual labels:  continuous-integration, code-coverage
koshry
Run on CI, Apply Rules on the Build and Get the Result back to the Pull Request.
Stars: ✭ 59 (-34.44%)
Mutual labels:  continuous-integration
NuttX
Official micro-ROS RTOS
Stars: ✭ 63 (-30%)
Mutual labels:  ros
mader
Trajectory Planner in Multi-Agent and Dynamic Environments
Stars: ✭ 252 (+180%)
Mutual labels:  ros
github-create-release-action
Create a GitHub release from a Tag
Stars: ✭ 33 (-63.33%)
Mutual labels:  continuous-integration
jacoco-report
Github action that publishes the JaCoCo report as a comment in the Pull Request
Stars: ✭ 31 (-65.56%)
Mutual labels:  code-coverage
costmap depth camera
This is a costmap plugin for costmap_2d pkg. This plugin supports multiple depth cameras and run in real time.
Stars: ✭ 26 (-71.11%)
Mutual labels:  ros
ros hadoop
Hadoop splittable InputFormat for ROS. Process rosbag with Hadoop Spark and other HDFS compatible systems.
Stars: ✭ 92 (+2.22%)
Mutual labels:  ros
cicdstatemgr
Utility for managing CICD state, sending notifications, and mediating Slack interactive messages & slash commands across multiple flows of execution in CICD platforms such as Tekton.
Stars: ✭ 25 (-72.22%)
Mutual labels:  continuous-integration
laminas-ci-matrix-action
GitHub Action for creating a CI job matrix.
Stars: ✭ 19 (-78.89%)
Mutual labels:  continuous-integration
rospberrypi
Everything you need to set up ROS Melodic on the Raspberry Pi Zero / W
Stars: ✭ 33 (-63.33%)
Mutual labels:  ros
ws moveit
This ROS melodic workspace is created on Ubuntu 18.04. Here I worked on moveit & MTC projects like Pick, Place, Pouring task for multi-manipulator system using MoveIt Task Constructor(MTC).
Stars: ✭ 25 (-72.22%)
Mutual labels:  ros
aztarna
aztarna, a footprinting tool for robots.
Stars: ✭ 85 (-5.56%)
Mutual labels:  ros
indires navigation
ROS packages for ground robot navigation and exploration
Stars: ✭ 90 (+0%)
Mutual labels:  ros
pocketsphinx
Updated ROS bindings to pocketsphinx
Stars: ✭ 36 (-60%)
Mutual labels:  ros

ROS Node Example

Build & Test codecov

ROS allows for creating nodes that communicate with each other. It is very common to use C++ and Python to write these nodes.

This package contains example nodes written in C++ and Python that show minimal examples of using some very basic but powerful features of ROS. Those features include:

More ideas that are explored are deploying documentation using GitHub Pages, writing unit tests, and checking build status and code coverage.

Additional documentation at http://tdenewiler.github.io/node_example.

Description

There are several launch files included, the main one being node_example.launch. This will start a talker and listener written in C++ and a talker and listener written in Python. One GUI will open allowing you to see what messages are being recieved by the listeners and another GUI will allow you to change the values sent from each talker. Both listener nodes receive messages from both talkers, showing that the languages used to write the talkers and listeners can be mixed.

Usage

Build a workspace containing this repository. A node_example.rosinstall file has been included for convenience with wstool.

To start all the nodes run

roslaunch node_example node_example.launch

You should see two windows open: rqt_reconfigure and rqt_console. They will look like the following screenshots.

Reconfigure GUI

Console GUI

At this point you can modify the strings or numbers in the reconfigure GUI and you should see those changes show up in the console GUI. There are enable parameters in each of the talker nodes so that the nodes can effectively be paused and resumed during runtime. This is a nice feature that allows easily turning system components on and off during operation for whatever reason (such as wanting to run multiple similar nodes side-by-side for comparison without using too many CPU/RAM resources, only running certain nodes when some conditions are met, etc.).

Branches

The main branch will keep up with the supported ROS1 distributions. These currently include Melodic (18.04) and Noetic (20.04). Tests are run using GitHub Actions for all of these distributions.

Testing

During development there are large benefits to employing unit tests to verify that code changes do not break existing functionality. This package contains unit tests for each of the C++ nodes. The unit tests are run using the *.test files in the test/ directory. The *.test files start the node to be tested plus the unit test code. The unit test code is written such that it publishes and subscribes to the topics that correspond to the interfaces of the node under test. Callbacks are used to verify that the expected data is available on the specified topics.

There are several methods of running the unit tests. Running the tests with continuous integration services for pull requests is a common method used to ensure pull requests can be safely merged. One popular continuous integration provider for open source projects is Travis CI. This project now uses GitHub Actions to perform tests prior to merging changes into the main branch. The build and test results for this package can be found in the table at the top of this page.

Unit tests are not magic bullets. The inputs to the nodes must take on enough values to verify that functions return valid values. This will be different for each function and is not fully covered here. Another aspect of unit tests is to ensure that all lines of code are exercised by unit tests, also referred to as code coverage.

A popular code coverage provider for open source projects is codecov. The code coverage results for this package can be found in the table at the top of this page. This tool provides some measure of confidence that the existing unit tests will catch any issues, and that new changes are introduced with unit test code.

Deploying GitHub Pages

Deployed using the command mkdocs gh-deploy.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].