ROS2 equivalents to ROS1 roscd, rosmsg rossrv...
Are there equivalent commands for roscd
, rosmsg
and rossrv
(especially for rosmsg show
), rosed
, rosls
and rosmv
?
ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
Are there equivalent commands for roscd
, rosmsg
and rossrv
(especially for rosmsg show
), rosed
, rosls
and rosmv
?
There are equivalents for some of them. In ROS 2 they're all under the ros2
command.
The equivalent to rosmsg/rossrv
is ros2 interface
.
$ rosmsg show std_msgs/Bool
bool data
ROS 2 equivalent
$ ros2 interface show std_msgs/msg/Bool
bool data
and for services
$ rossrv show std_srvs/Trigger
---
bool success
string message
ROS 2 equivalent
$ ros2 interface show std_srvs/srv/Trigger
---
bool success # indicate successful run of triggered service
string message # informational, e.g. for error messages
And ros2 interface
also works with actions
$ ros2 interface show test_msgs/action/Fibonacci
#goal definition
int32 order
---
#result definition
int32[] sequence
---
#feedback
int32[] sequence
In ROS 1 I think these were provided by rosbash
: http://wiki.ros.org/rosbash
$ rosls std_msgs
cmake msg package.xml
There's nothing equivalent in ROS 2 that I know of. Maybe you could make a bash alias around ros2 pkg prefix
?
$ ls `ros2 pkg prefix --share std_msgs`
cmake environment local_setup.bash local_setup.dsv local_setup.sh local_setup.zsh msg package.dsv package.xml
Here's a brief intro to the command line tools. https://index.ros.org/doc/ros2/Tutori...
If you'd like to contribute to them, most of the source code is in the ros2cli
repo: https://github.com/ros2/ros2cli . Some tools are in other repos; for example ros2 launch
is in the ros2/launch_ros repo: https://github.com/ros2/launch_ros/tr...
Yes alias ros2cd="ros2 pkg prefix"
works but is not as handy as the original roscd: Autocompletion does not work and ros2cd
alone either. Since we're in a Python subprocess, it can't work the same. Maybe opening a subshell? Not sure that would be nice though.
ros2 pkg prefix <tab>
does provide completion of all available package names. For a custom alias you will need to register the completion function yourself.
An equivalent to roscd
is provided by colcon-cd
- see https://github.com/colcon/colcon-cd/
Asked: 2020-08-03 11:00:08 -0500
Seen: 2,555 times
Last updated: Aug 05 '20
Is it possible to use shared memory as IPC with galactic windows 10?
Why does ROS2 custom message colcon build give include file errors?
Service call from python hangs
Including custom header file in ROS2 CMakeList
Build only modified packages with Colcon, ROS2
Is it possible with ROS2 to send and recieve UDP messages to a certain IP address ?