Skip to content

Instantly share code, notes, and snippets.

@kor01
Last active July 4, 2017 23:45
Show Gist options
  • Save kor01/2a796f50266b131e391649ad24be7b8d to your computer and use it in GitHub Desktop.
Save kor01/2a796f50266b131e391649ad24be7b8d to your computer and use it in GitHub Desktop.
[ros topic service] #ros
# list parameter
rosparam list
# set parameter
rosparam set parameter_name
rosparam set /background_r 150
# get parameter
rosparam get /background_g
# get all parameter
rosparam get /
# dump parameter
rosparam dump params.yaml
# load parameter
rosparam load params.yaml
# load into a namespace
rosparam load params.yaml my_ns
# list all services
rosservice list
# get service type
rosservice type my_service
# call a service from CMD
rosservice call service args
# show service datatype
rosservice type /spawn | rossrv show
# echo topic content
rostopic echo topic
# list all topics
rostopic list
# list all topics verbosely
rostopic list -v
# get data type of the topic
rostopic type my_topic
# publish data to topic manually
rostopic pub topic message_type data
rostopic pub -1 /turtle1/cmd_vel geometry_msgs/Twist -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'
# get publish frequency of topic
rostopic hz my_topic
# plot ros topic
rosrun rqt_plot rqt_plot
# get current graph
rosrun rqt_graph rqt_graph
# echo and dump topic information flow
rostopic echo my_good_topic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment