Note: This repository is deprecated. Please see TheProjectsGuy/Learning_ROS
Intermediate level ROS tutorials
This repository contains ROS packages for ROS intermediate level tutorials.
Table of contents
Packages
The individual packages created for the tutorials.
test_rosbag
This package is to demonstrate the working of rosbag. Please refer to this post for further information.
The nodes in this package are as follows:
- C++ Nodes:
- rdata_pub: Published random numbers along with header.
- Python Nodes:
- RandomDataPublisher.py: Published random numbers along with header.
test_rosyaml
This package is to demonstrate the working of rosparam and describe the workings of the ROS parameter server. This package also has the ROS Parameter Server APIs for C++ and Python demonstrated. Build the package and refer to this post for further information.
The nodes in this package are as follows:
- C++ Nodes:
- single_param_val: Fetch the value of parameter named
var1
. - all_params: List the name and values of all parameters on the parameter server.
- h2_ns2_param_val: Get the vector stored in parameter
/header2/ns2
. Note that the C++ API doesn't allow vectors which have elements of different datatypes.
- single_param_val: Fetch the value of parameter named
- Python Nodes:
- param_v1.py: Fetch the value of parameter named
var1
. - get_all_params.py: List the name and values of all parameters on the parameter server.
- param_h2_ns2.py: Get the vector stored in parameter
/header2/ns2
. Note that the Python API allows vectors which have elements of different datatypes, since the way Python handles datatypes is different.
- param_v1.py: Fetch the value of parameter named
The configuration files in this package are as follows:
- param1.yaml: A file to demonstrate the structure of a YAML file.
- param2.yaml: Same as param1, but the parameter
/header2/ns2
has a vector of strings, instead of a vector of elements of different data types.
Building packages
To build a package, perform the following steps:
- Clone this repository.
- Move the desierd package (entire folder) into the
src
folder of your workspace. - Run
catkin_make
in your workspace folder.
This will build the package. You may use the --pkg PACKAGE_NAME
parameter in the call to catkin_make
to build specific packages only. After the package is built, you'll be able to run the nodes in it.
Note: The workspace must be active (it should appear in the ROS_PACKAGE_PATH environment variable).