ROS Examples for various basic concepts. All example files names are self explanatory except the exampleXX.
sudo apt install ros-noetic-navigation
sudo apt install ros-noetic-robot-localization
sudo apt install libtbb-dev
mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
cd src
git clone https://github.com/dringakn/ROSExamples.git
git clone https://github.com/dringakn/ufomap.git
git clone https://github.com/dringakn/mav_trajectory_generation
cd ~/catkin_ws
rosdep install --from-paths src --ignore-src -y -r
Basic ROS C++ node structure.
Publish a Float32 msg on "topic": sends a uniform random number [0-99] every 100 milliseconds. modify find_package ( ... random_numbers ...) inside CMakeLists.txt of the package.
Publisehs two custom generated messages on "sensor" and "command" topics.
- sensmsg.msg: Header header float64 front float64 left float64 right
- cmdmsg.msg: Header header float64 vl float64 vr
- modify add_message_files(... cmdmsg.msg sensmsg.msg ...) inside CMakeLists.txt of the package.
Subscribe to the custom messages "sensor" and "command"
ROS parameter server example
Client for addition request from the server node (example7).
- addsrv.srv float64 a float64 b '--- float64 result
- modify add_service_files(... addsrv.srv ...) inside CMakeLists.txt of the package.
Custom server to respond addition request from client node (example6)
Action client
Action server
Captures an image from the webcam and publish it on a topic.
Eigen matrix example
PointCloud load (*.ply) example