{"id":16489532,"url":"https://github.com/tdenewiler/node_example","last_synced_at":"2025-10-29T06:47:37.026Z","repository":{"id":18854411,"uuid":"22070813","full_name":"tdenewiler/node_example","owner":"tdenewiler","description":"ROS node examples with parameter server, dynamic reconfigure, timers, and custom messages for C++ and Python.","archived":false,"fork":false,"pushed_at":"2023-02-01T01:13:30.000Z","size":1689,"stargazers_count":106,"open_issues_count":0,"forks_count":27,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-16T04:41:15.329Z","etag":null,"topics":["code-coverage","continuous-integration","documentation","dynamic-reconfigure","ros","ros-node","ros1","unit-tests"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tdenewiler.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-21T16:03:23.000Z","updated_at":"2025-03-08T14:49:54.000Z","dependencies_parsed_at":"2023-02-17T09:30:32.458Z","dependency_job_id":null,"html_url":"https://github.com/tdenewiler/node_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdenewiler%2Fnode_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdenewiler%2Fnode_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdenewiler%2Fnode_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tdenewiler%2Fnode_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tdenewiler","download_url":"https://codeload.github.com/tdenewiler/node_example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243910667,"owners_count":20367546,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["code-coverage","continuous-integration","documentation","dynamic-reconfigure","ros","ros-node","ros1","unit-tests"],"created_at":"2024-10-11T13:44:26.899Z","updated_at":"2025-10-29T06:47:31.991Z","avatar_url":"https://github.com/tdenewiler.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ROS Node Example\n\n![Build \u0026 Test](https://github.com/tdenewiler/node_example/workflows/Build%20\u0026%20Test/badge.svg)\n[![codecov](https://codecov.io/gh/tdenewiler/node_example/branch/main/graph/badge.svg)](https://codecov.io/gh/tdenewiler/node_example)\n\n[ROS](http://ros.org) allows for creating nodes that communicate with each other.\nIt is very common to use C++ and Python to write these nodes.\n\nThis package contains example nodes written in C++ and Python that show minimal examples of using\nsome very basic but powerful features of ROS.\nThose features include:\n\n* [parameter server](http://wiki.ros.org/Parameter%20Server)\n* [dynamic reconfigure](http://wiki.ros.org/dynamic_reconfigure/Tutorials)\n* [timers](http://wiki.ros.org/roscpp/Overview/Timers)\n* [custom messages](http://wiki.ros.org/ROS/Tutorials/DefiningCustomMessages)\n* classes with callback functions for\n  [publishers and subscribers](http://wiki.ros.org/roscpp/Overview/Publishers%20and%20Subscribers)\n* [remap](http://wiki.ros.org/roslaunch/XML/remap) topic names\n\nMore ideas that are explored are deploying documentation using [GitHub Pages](https://pages.github.com/),\nwriting unit tests, and checking build status and code coverage.\n\nAdditional documentation at\n[http://tdenewiler.github.io/node_example](http://tdenewiler.github.io/node_example).\n\n## Description\n\nThere are several launch files included, the main one being `node_example.launch`.\nThis will start a talker and listener written in C++ and a talker and listener written in Python.\nOne GUI will open allowing you to see what messages are being received by the listeners and another GUI will allow\nyou to change the values sent from each talker.\nBoth listener nodes receive messages from both talkers, showing that the languages used to write the talkers and\nlisteners can be mixed.\n\n## Usage\n\n[Build a workspace](http://wiki.ros.org/catkin/Tutorials/create_a_workspace) containing this repository.\nA `node_example.rosinstall` file has been included for convenience with [`wstool`](http://wiki.ros.org/wstool).\n\nTo start all the nodes run\n\n    roslaunch node_example node_example.launch\n\nYou should see two windows open: `rqt_reconfigure` and `rqt_console`.\nThey will look like the following screenshots.\n\n  ![Reconfigure GUI](docs/images/reconfigure.png)\n\n  ![Console GUI](docs/images/console.png)\n\nAt this point you can modify the strings or numbers in the reconfigure GUI and you should see those changes show up\nin the console GUI.\nThere are `enable` parameters in each of the talker nodes so that the nodes can effectively be paused and resumed\nduring runtime.\nThis is a nice feature that allows easily turning system components on and off during operation for whatever reason\n(such as wanting to run multiple similar nodes side-by-side for comparison without using too many CPU/RAM resources,\nonly running certain nodes when some conditions are met, etc.).\n\n## Branches\n\nThe `main` branch will keep up with the supported ROS1 distributions.\nThese currently include Melodic (18.04) and Noetic (20.04).\nTests are run using GitHub Actions for all of these distributions.\n\n## Testing\n\nDuring development there are large benefits to employing unit tests to verify that code changes do not break existing\nfunctionality.\nThis package contains unit tests for each of the C++ nodes.\nThe unit tests are run using the `*.test` files in the `test/` directory.\nThe `*.test` files start the node to be tested plus the unit test code.\nThe unit test code is written such that it publishes and subscribes to the topics that correspond to the interfaces\nof the node under test.\nCallbacks are used to verify that the expected data is available on the specified topics.\n\nThere are several methods of running the unit tests.\nRunning the tests with continuous integration services for pull requests is a common method used to ensure pull\nrequests can be safely merged.\nOne popular continuous integration provider for open source projects is [Travis CI](https://travis-ci.org).\nThis project now uses GitHub Actions to perform tests prior to merging changes into the `main` branch.\nThe build and test results for this package can be found in the table at the top of this page.\n\nUnit tests are not magic bullets.\nThe inputs to the nodes must take on enough values to verify that functions return valid values.\nThis will be different for each function and is not fully covered here.\nAnother aspect of unit tests is to ensure that all lines of code are exercised by unit tests, also referred to as\ncode coverage.\n\nA popular code coverage provider for open source projects is [codecov](https://codecov.io).\nThe code coverage results for this package can be found in the table at the top of this page.\nThis tool provides some measure of confidence that the existing unit tests will catch any issues, and that new\nchanges are introduced with unit test code.\n\n## Deploying GitHub Pages\n\nDeployed using the command `mkdocs gh-deploy`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdenewiler%2Fnode_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftdenewiler%2Fnode_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftdenewiler%2Fnode_example/lists"}