The ros2 run
command is a terminal command used in the Robot Operating System (ROS) to execute a node in a package. This command is used to run a specific node that is part of a package.
To use the ros2 run
command, open a terminal window and type the following command:
ros2 run {package_name} {node_name}
Where {package_name}
is the name of the package that contains the node and {node_name}
is the name of the specific node you want to execute.
For example, if you want to execute the turtlebot3_teleop
node in the turtlebot3
package, you would enter the following command:
ros2 run turtlebot3 turtlebot3_teleop
This command will start the turtlebot3_teleop
node and allow you to control the turtlebot3 robot using the keyboard.
In addition to the package and node name, there are other options that you can use with the ros2 run
command. For more information on these options, you can type the following command in the terminal:
ros2 run --help
This will display a list of options and their descriptions.
In summary, the ros2 run
command is a useful terminal command in ROS that allows you to execute a specific node in a package. It is a quick and easy way to run nodes and start working with your ROS system.