Run roscore first, then open a new terminal
1 Check which parameters the rosnode command accepts, enter directly
rosnode
You can see the following commands
rosnode ping Test connected nodes
rosnode list List currently active nodes
rosnode info Output node information
rosnode machine List nodes running on a specific computer or list machine
rosnode kill Shut down a running node
rosnode cleanup Clear the registration information of unreachable nodes
If you want to get a more detailed explanation of these parameters, run
rosnode <param> -h
2 Start the new node
rosrun turtlesim turtlesim_node
You can see a new page pop up showing a turtle.
rosrun turtlesim turtle_teleop_key
Then run a new node, you can control the turtle movement through the keyboard
3 Check which parameters are accepted by the rostopic command and enter directly
rostopic
rostopic bw Display the broadband used by the topic
rostopic echo Put message data on the screen
rostopic find Find topics by type
rostopic hz Display topic publishing frequency
rostopic info Output active topic information
rostopic list List active topics
rostopic pub Publish data to topics
rostopic type type of output topic
4 Check which parameters are accepted by the rosservice command and enter directly
rosservice
rosservice args output service parameters
rosservice call call service according to command line parameters
rosservice find query service according to service type
rosservice info output service information
rosservice list list active service list
rosservice type output service type
rosservice uri output ROSRPC uri service
5 Using the parameter server
snarled
rosparam set set parameter value
rosparam get get parameter value
rosparam load load parameter value from file
rosparam dump save parameter to a file
rosparam delete delete parameter
rosparam list list all parameter names
6 message message
rosmsg
rosmsg show View message details
rosmsg list List all messages
rosmsg md5 Show messages md5sum
rosmsg package List
messages in feature packages rosmsg packages List feature packages that contain messages