ROS Quick Start Reference Card - QuanergySystems/quanergy_client GitHub Wiki
This reference card offers the most relevant ROS commands, Ubuntu commands, and command-line options that you may need to employ when using Quanergy products.
ROS Common Commands
Command | Definition | Usage/Example |
---|---|---|
rosbag | Records and plays back ROS topics in high performance, avoiding the deserialization and re-serialization of messages. | |
rosbag record | = Generates a bag file with the contents of all topics that you pass to it. | To record all topics: $ rosbag record -a |
To record specific topics: $ rosbag record [topic1] [topic2] |
||
rosbag play | = Plays back the contents of one or more bag files, time-synchronized. | To replay all messages without waiting: $ rosbag play -a [demo_log].bag |
To replay several bag files at once: $ rosbag play [demo1].bag [demo2].bag |
||
rosbag compress | = Compresses one or more bag files. | |
rosbag decompress | = Decompresses one or more bag files. | |
rosbag filter | = Filters the contents of the bag. | |
roscd | Changes directories to a package or stack. | $ roscd [package[/subdir]] |
roscore | Allows ROS nodes to communicate by providing nodes and programs that are essential in a ROS-based system. Starts up a ROS master, a ROS parameter server, a rosout logging node. | $ roscore |
roscp | Copies a file from one place to another. | $ roscp [package] [file] [destination] |
roscpp | Provides a client library that enables C++ coders to interface with ROS topics, services, parameters. | |
roslaunch | Starts roscore (if needed), local nodes, and remote nodes via Secure Shell (SSH), and sets parameters on the parameter server. | To launch a file in a package: $ roslaunch [package] [file].launch |
To launch on a different port: $ roslaunch -p 1234 [package] [file].launch |
||
To launch on the local nodes: $ roslaunch --local [package] [file].launch |
||
rospy | Provides a client library that enables Python coders to interface with ROS topics, services, parameters. | |
rosrun | Runs a ROS package’s executable with minimal typing. $ rosrun [package] [executable] |
|
roswtf | Displays errors and warnings about a running ROS system or launch file. | $ roswtf |
$ roswtf [file] |
CREDIT: Adapted from ROS Cheat Sheet by Willow Garage (2010).
ROS Introspection Commands
Command | Definition | Usage/Example |
---|---|---|
rosmsg/rossrv | Displays message/service (msg/srv) data structure definitions. | |
rosmsg show | = Displays the fields in the msg/srv. | To display the Pose msg: $ rosmsg show Pose |
rosmsg list | = Displays names of all the msg/srv. | |
rosmsg md5 | = Displays the msg/srv md5 sum. | |
rosmsg package | = Lists all the msg/srv in a package. | To list the messages in the nav msgs package: $ rosmsg package nav msgs |
rosmsg packages | = Lists all packages containing the msg/srv. | To list the packages using sensor msgs/CameraInfo: $ rosmsg packages sensor msgs/CameraInfo |
rosnode | Displays debugging information about ROS nodes, including publications, subscriptions, connections. | |
rosnode ping | = Test connectivity to node. | To ping all nodes: $ rosnode ping --all |
rosnode list | = List active nodes. | |
rosnode info | = Print information about a node. | |
rosnode machine | = List nodes running on a machine. | To list nodes on a machine: $ rosnode machine aqy.local |
rosnode kill | = Kill a running node. | To kill all nodes: $ rosnode kill -a |
rostopic | Displays debug info about ROS topics, including publishers, subscribers, publishing rate, messages. | |
rostopic bw | = Displays bandwidth used by topic. | |
rostopic echo | = Prints messages to screen. | To clear the screen after each message is published: $ rostopic echo -c /topic name |
To display messages that match a given Python expression: $ rostopic echo --filter "m.data==’foo’" /topic name |
||
rostopic hz | = Displays publishing rate of topic. | |
rostopic list | = Prints information about active topics. | |
rostopic pub | = Publishes data to topic. | To publish hello at 10 Hz: $ rostopic pub -r 10 /topic name std msgs/String hello |
rostopic type | = Prints topic type. | To pipe output of rostopic to rosmsg, to view msg type: $ `rostopic type /topic name |
rostopic find | = Finds topics by type. | |
rosparam | Gets and sets ROS parameters on the parameter server using YAML-encoded files. | |
rosparam set | = Sets a parameter. | To set a list with one as a string, integer, and float: $ rosparam set /foo "[’1’, 1, 1.0]" |
rosparam get | = Gets a parameter. | |
rosparam load | = Loads parameters from a file. | |
rosparam dump | = Dumps parameters to a file. | To dump parameters in a specific namespace to a file: $ rosparam dump dump.yaml /namespace |
rosparam delete | = Deletes a parameter. | |
rosparam list | = Lists parameter names. | To list all the parameters in a namespace: $ rosparam list /namespace |
rosservice | Lists and queries ROS services. | |
rosservice list | = Prints information about active services. | |
rosservice node | = Prints name of node providing a service. | |
rosservice call | = Calls the service with the given args. | To call a service from the command-line: $ rosservice call /add two ints 1 2 |
rosservice args | = Lists the arguments of a service. | |
rosservice type | = Prints the service type. | To pipe output of rosservice to rossrv, to view srv type: $ `rosservice type add two ints |
rosservice uri | = Prints the service ROSRPC uri. | |
rosservice find | = Finds services by service type. | To display all services of a particular type: $ rosservice find rospy tutorials/AddTwoInts |
rqt_dep | Displays package structure and dependencies. | To display package structure and dependencies: $ rqt_dep [options] |
CREDIT: Adapted from ROS Cheat Sheet by the Open Source Robotics Foundation (2015) and Willow Garage (2010).
ROS Indigo Catkin Workspaces Scripts
Action | Usage/Example |
---|---|
Set up and use a new catkin workspace from scratch: | $ source /opt/ros/indigo/setup.bash |
$ mkdir -p ~/catkin_ws/src |
|
$ cd ~/catkin_ws/src |
|
$ catkin_init_workspace |
|
Get a local copy of the code for an existing ROS package and keep it up to date using wstool: | $ cd ~/catkin_ws/src |
$ wstool init |
|
$ wstool set tutorials --git git://github.com/ros/ros tutorials.git |
|
$ wstool update |
|
Create a new catkin ROS package in an existing workspace. After doing so, you will need to edit CMakeLists.txt to detail how you want your package built and to add information to your package.xml. | $ catkin_create_pkg [package] [depend1] [depend2] |
$ cd ~/catkin_ws/src |
|
$ catkin_create_pkg tutorials std_msgs rospy roscpp |
|
Build all the packages in the workspace and then source the setup.bash to add the workspace to the ROS_PACKAGE_PATH. | $ cd ~/catkin_ws |
$ ~/catkin_make |
|
$ source devel/setup.bash |
CREDIT: to Adapted from ROS Indigo Catkin Workspaces Cheatsheet by the Open Source Robotics Foundation (2015) and Willow Garage (2010).
Ubuntu Package and Network Management Commands
Action | Command |
---|---|
Refresh available updates. | $ sudo apt-get update |
Install a specified package. | $ sudo apt-get install [package] |
Show network information. | $ ifconfig |
Show wireless information. | $ iwconfig |
Scan for wireless networks. | $ sudo iwlist scan |
Standard Command-Line Options
Action | Option | Short | Long |
---|---|---|---|
Show all information or operate on all arguments. | all | -a | --all |
Give usage message and exit. | help | -h | --help |
Filename follows. (In tar and gawk.) | file | -f | --file |
Force overwrite of target file(s). (In cp, mv, rm.) | force | -f | --force |
List files or arguments without taking other action. | list | -l | --list |
Output the filename. | output | -o | |
Suppress stdout. | quiet | -q | --quiet |
Operate recursively down the directory tree. | recursive | -r, -R | --recursive |
Output additional information to stdout or stderr. | verbose | -v | --verbose |
Show program version and exit. | version | -v | --version |
Apply compression, usually gzip. | compress | -z v--compress | |
Compress data, reducing size by 60% or more, lossless. | compress | --lz4 |
Definitions
In brief, ROS is the agent that enables message-passing via topics between nodes, such as those in Quanergy’s LiDAR sensor system, so that bag files of data are recorded and point clouds are visualized.
Bag: A file format (with .bag extension) for storing ROS message data. When the M8-1 sensor collects data, that data is automatically recorded in a bag file. “Bags” have an important role in ROS, and a variety of tools have been written to enable their storage, export, processing, analysis, and visualization. (http://wiki.ros.org/Bags)
Node: An individual process that performs computation. In a ROS system, nodes are combined together and communicate with one another. Any software crashes are isolated to individual nodes for greater fault tolerance. (http://wiki.ros.org/Nodes)
PointCloud2: The newly revised ROS point cloud message and de facto standard in Point Cloud Library (PCL). A point cloud is a set of data points collected by a scanner, such as the M8-1 LiDAR sensor, and mapped to a three-dimensional Cartesian coordinate system defined by X, Y, and Z coordinates to represent the surface of an object. (http://wiki.ros.org/pcl/Overview)
ROS: Robot Operating System is a large, open-ended collaboration framework of software conventions, libraries, and tools, including drivers and algorithms, which are used as a platform for challenging applications. (http://wiki.ros.org/ROS/Introduction)
Topics: Named buses over which ROS nodes exchange messages. Topics employ anonymous publish/subscribe semantics in order to decouple the production of information from its consumption. There can be multiple publishers and subscribers to a topic. Nodes that are interested in data subscribe to relevant topics, and nodes that generate data publish to relevant topics. (http://wiki.ros.org/Topics)
Details
Access additional pertinent information from the following sources:
ROS primer: “A Gentle Introduction to ROS” at https://cse.sc.edu/~jokane/agitr/agitr-letter.pdf.
ROS.org: An extensive formal repository of publicly released ROS tutorials, commands, software, publications, events, and so on.
User guides: To receive a list of quick access links to Quanergy’s LiDAR sensor system hardware and software user guides, send an email request to [email protected] with the subject “Request Standard Customer Support Documentation.”
Contact Information
Quanergy Systems, Inc., 482 Mercury Drive, Sunnyvale, CA 94085-4706 | http://quanergy.com
For purchases made directly from Quanergy: contact [email protected] for any questions
For purchases from a third party (value-added reseller/system integrator): contact them for support
Edit message Write a small message here explaining this change. (Optional) © 2020 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About