[ROS Tutorial] ROS Common Commands


1.rosnode

1.1 rosnode ping

1.1.1 Test the connection status of all nodes

rosnode ping --all

Insert image description here

1.1.2 Test the connection status to a certain node

rosnode ping /<node-name>
  • Note the slash

1.2 rosnode list

rosnode list
  • list active nodes

1.3 rosnode info

rosnode info /<node-name>
  • View a node information

Insert image description here

1.4 rosnode machine

1.4.1 List all devices

rosnode machine

Insert image description here

1.4.2 View the running nodes on the specified device

rosnode machine <machine-name>

Insert image description here

1.5 rosnode kill

1.5.1 End all node processes

rosnode kill --all

1.5.2 List all nodes and select the node to end the process

rosnode kill

Insert image description here

1.5.3 Ending a node process

rosnode kill /<node-name>

1.6 rosnode cleanup

rosnode cleanup
  • Clean up unconnectable node processes

2. rostopic

2.1 round echo

rostopic echo /<topic-name>
  • Listen to the news of a topic and display it
  • Optional parameters

--offset:Display time in messages as offset from current time (e.g. to calculate lag/latency).
-c:Clear the screen after each message is published. Cannot be used with -p.
-b:Display messages in a bag file:

2.2 rotopic list

rostopic list
  • List all active topics
  • Optional parameters:

-b:List topics in a bag file.
-p:List only publishers.
-s:List only subscribers.

2.3 rostopic info

rostopic info /<topic-name>
  • List information about a topic

2.4 rostopic type

rostopic type /<topic-name>
  • List the types of messages published by a topic

2.5 rostopic find

rostopic find <package-name>/<message-name>
  • Find topics based on message type

2.6 rostopic bw

rostopic bw /<topic-name>
  • Display the bandwidth of a topic

2.7 rostopic delay

rostopic delay /<topic-name>
  • Show topic delay with header

2.8 rostopic hz

rostopic hz /<topic-name>
  • Shows how often a topic is posted

3.rosmsg

3.1 rosmsg show

rosmsg show /<message-type>
  • Display the definition of a message type
  • Optional parameters

-r:Display the raw msg definition.

Insert image description here

3.2 rosmsg packages

rosmsg packages
  • List all packages containing the message
  • Optional parameters

-s:Display all packages on a single line. Useful for backtick invocations.

3.3 rosmsg package

rosmsg package /<package-name>
  • List all message types under a package
  • Optional parameters

-s:Display all packages on a single line. Useful for backtick invocations.

3.4 rosmsg users

rosmsg users /<message-type>
  • Find all source code files that use a certain message type

4.rosservice

4.1 rosservice args

rosservice args /<service-name>
  • Display the parameters of a request in a service

4.2 rosservice list

rosservice list
  • List all active services
  • Optional parameters:

-n:Include the name of the node that implements the service.

4.3 rosservice info

rosservice info <service-name>
  • Print information about services

4.4 rosservice find

rosservice find <package-name>/<service-type>
  • Find the name of a service containing this type according to the type of service

4.5 rosservice type

rosservice type <service-type>
  • Based on the name of the service, give the type of service

5. rossrv

5.1 rossrv show

rossrv show <package-name>/<service-name>
  • Display the definition of a service

5.2 rossrv packages

rossrv packages
  • List all packages containing services

5.3 rossrv package

rossrv package /<package-name>
  • List all services under a package

6.rosparam

6.1 rosparam list

rosparam list
  • list all parameters

6.2 rosparam set

rosparam set <parameter-name> [parameter-value]
  • Setting parameters

6.3 rosparam get

rosparam get <parameter-name>
  • Get the value of the parameter

6.4 rosparam delete

rosparam delete <parameter-name>
  • delete parameter

6.5 rosparam load

rosparam load <yaml-file>
  • To load parameters from an external file, first prepare the yaml file

6.6 rosparam dump

rosparam dump <yaml-file>
  • write out arguments to external file

Guess you like

Origin blog.csdn.net/qq_50791664/article/details/130066407