February 2020
Intermediate to advanced
432 pages
10h 50m
English
rosrun allows you to manually launch a node from a package. The syntax is quite simple:
$ rosrun <name_of_package> <name_of_script>
The script includes a declaration of a node. In the case of our distance-sensor.py example, this is accomplished in the following line:
rospy.init_node("distance_sensor")
Then, to launch the node, write this command in another terminal:
$ rosrun mygopigo distance-sensor.py
After these two commands, you already have a ROS functional environment that provides sensor readings. The node also prints the current measure in the terminal process, transformed into millimeters (there is no need to open another terminal to listen to the topic). The usage of millimeters is just for visualization ...