ros2 / ros2cli Goto Github PK
View Code? Open in Web Editor NEWROS 2 command line interface tools
License: Apache License 2.0
ROS 2 command line interface tools
License: Apache License 2.0
allenh1@machina:~/ros2_ws$ ros2 run ros1_bridge dynamic_bridge --show-introspective
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: unrecognized arguments: --show-introspective
I have argcomplete installed, and working, but I cannot complete a binary, nor can I pass any arguments to the executable.
Running on OS X from binaries, but I've also seen it on linux from source.
$ ./lib/demo_nodes_cpp/talker -t /chatter_qos
Publishing: 'Hello World: 1'
Publishing: 'Hello World: 2'
^Csignal_handler(2)
$ ros2 run demo_nodes_cpp talker -t /chatter_qos
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: unrecognized arguments: -t /chatter_qos
Also happens with python nodes:
$ ros2 run demo_nodes_py listener_qos -n 10
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: unrecognized arguments: -n 10
Required Info:
Start a talker executable in one terminal
set RMW_IMPLEMENTATION=rmw_connext_cpp
ros2 run demo_nodes_cpp talker
Echo the topic in another terminal
set RMW_IMPLEMENTATION=rmw_connext_cpp
REM make sure the daemon uses connext
ros2 daemon stop
ros2 daemon start
ros2 topic echo /chatter
Every message published would be echoed on the console
The first message is printed, but then an error message deserialize from cdr buffer failed
appears. The command never prints another message despite the talker continuing to publish.
C:\dev\ros2-windows>ros2 topic echo /chatter
RTI Data Distribution Service Evaluation License issued to OSRF (OSRF01) dthomas@osrfoundation.org For non-production use only.
Expires on 5-Nov-2018 See www.rti.com for more information.
data: 'Hello World: 50'
deserialize from cdr buffer failed
Additionally, the command ros2 topic echo /chatter
cannot be interrupted using CTRL
+ c
. I had to kill the process in the task manager.
Required Info:
ros2 pkg executables examples_rclpy_minimal_publisher
I'd expect only executable things to appear in the list
C:\Users\osrf>ros2 pkg executables examples_rclpy_minimal_publisher
examples_rclpy_minimal_publisher publisher_local_function.exe
examples_rclpy_minimal_publisher publisher_member_function.exe
examples_rclpy_minimal_publisher publisher_old_school.exe
Both the *.exe
and *-script.py
appear in the list, but only one of them is executable
C:\Users\osrf>ros2 pkg executables examples_rclpy_minimal_publisher
examples_rclpy_minimal_publisher publisher_local_function-script.py
examples_rclpy_minimal_publisher publisher_local_function.exe
examples_rclpy_minimal_publisher publisher_member_function-script.py
examples_rclpy_minimal_publisher publisher_member_function.exe
examples_rclpy_minimal_publisher publisher_old_school-script.py
examples_rclpy_minimal_publisher publisher_old_school.exe
The script cannot be executed using ros2 run, so it probably shouldn't be in the list.
C:\Users\osrf>ros2 run examples_rclpy_minimal_publisher publisher_local_function-script.py
Traceback (most recent call last):
File "C:\dev\ros2\Scripts\ros2-script.py", line 11, in <module>
load_entry_point('ros2cli==0.0.0', 'console_scripts', 'ros2')()
File "C:\dev\ros2\Lib\site-packages\ros2cli\cli.py", line 64, in main
rc = extension.main(parser=parser, args=args)
File "C:\dev\ros2\Lib\site-packages\ros2run\command\run.py", line 73, in main
return run_executable(path=path, argv=args.argv, prefix=prefix)
File "C:\dev\ros2\Lib\site-packages\ros2run\api\__init__.py", line 56, in run_executable
process = subprocess.Popen(cmd)
File "C:\Python36\lib\subprocess.py", line 707, in __init__
restore_signals, start_new_session)
File "C:\Python36\lib\subprocess.py", line 992, in _execute_child
startupinfo)
OSError: [WinError 193] %1 is not a valid Win32 application
Required Info:
--network=host
Machine 2 (ubuntu in docker)
ros2 topic pub /test_topic std_msgs/String "{data: 'Hello World'}"
# This had been running a while
# CTRL+C, then ran
ros2 topic pub /test_topic std_msgs/String "{data: 'Hello World1'}"
Machine 1 (windows in VM)
ros2 topic echo /test_topic std_msgs/String
# above command receives messages
ros2 topic list
# This lists no topics, but publisher is stull running on machine 2
I'd expect ros2 topic list
to be able to list a topic if it was just successfully echo'd
This is verbatim from cmd.exe
C:\Users\osrf>ros2 topic echo /test_topic std_msgs/String
data: Hello World
data: Hello World
data: Hello World
data: Hello World
data: Hello World
data: Hello World
data: Hello World
data: Hello World
data: Hello World1
data: Hello World1
C:\Users\osrf>
C:\Users\osrf>
C:\Users\osrf>
C:\Users\osrf>ros2 topic list
C:\Users\osrf>ros2 daemon status
The daemon is running
C:\Users\osrf>ros2 topic list
C:\Users\osrf>
This happened once, but I'm unable to reproduce it since. I'm creating a ticket so I have something to search for in case it shows up again.
If I start out with nothing at all running, then run:
$ ros2 service call /add_two_ints example_interfaces/AddTwoInts
And then in a second terminal, I run:
$ ros2 run demo_nodes_cpp add_two_ints_server
The service request never comes through. If I reverse the order (starting the server first), then it works fine. It seems like ros2 service call
is not waiting for the service to become available before sending the request.
When testing #106 I noticed I cannot get ros2 param
or ros2 lifecycle
on opensplice. ros2 service
works though:
Shell 1:
ros2 run demo_nodes_cpp parameter_node
Shell 2:
ros2 param set parameter_node foo 42
Failed to wait on wait set: failed to detach guard condition, at /home/mikael/work/ros2/bouncy_ws/src/ros2/rmw_opensplice/rmw_opensplice_cpp/src/rmw_wait.cpp:375, at /home/mikael/work/ros2/bouncy_ws/src/ros2/rcl/rcl/src/rcl/wait.c:647
Set parameter successful
Get the same error message when doing service calls via ros2 lifecycle
ros2 run lifecycle lifecycle_talker
ros2 lifecycle get lc_talker
I cannot create a key for a node with ros2 security create_key
due to an invalid keystore directory. What are valid keystore directories?
If I run the command:
ros2 srv show /add_two_ints
I get the following traceback:
Traceback (most recent call last):
File "/usr/bin/ros2", line 9, in <module>
load_entry_point('ros2cli==0.0.0', 'console_scripts', 'ros2')()
File "/opt/ros/r2b2/lib/python3.5/site-packages/ros2cli/cli.py", line 64, in main
rc = extension.main(parser=parser, args=args)
File "/opt/ros/r2b2/lib/python3.5/site-packages/ros2srv/command/srv.py", line 34, in main
return extension.main(args=args)
File "/opt/ros/r2b2/lib/python3.5/site-packages/ros2srv/verb/show.py", line 37, in main
path = get_service_path(package_name, service_name)
File "/opt/ros/r2b2/lib/python3.5/site-packages/ros2srv/api/__init__.py", line 44, in get_service_path
service_types = get_service_types(package_name)
File "/opt/ros/r2b2/lib/python3.5/site-packages/ros2srv/api/__init__.py", line 32, in get_service_types
if not has_resource('packages', package_name):
File "/opt/ros/r2b2/lib/python3.5/site-packages/ament_index_python/resources.py", line 88, in has_resource
assert resource_name, 'The resource name must not be empty'
Looking at it, while the syntax of the command is clearly wrong (it should be something like ros2 srv show std_srvs/Trigger
), it is not a nice user-experience to get a traceback for that. It would be nicer to get the help message, or an error message saying that the argument was not well-formed.
It could be nice to have a tool to get the dependencies of a given package. Something like:
ros2 pkg depends <package name>
If we want to get fancier, we could also add options for different types of dependencies (build, exec, test, etc.).
And if we want to get even fancier, we could add an option to get sub-dependencies (essentially calling ros2 pkg depends recursively). This could be a separate feature request, though.
My first instinct would be to use the information encoded in the package.xml file. This would require two steps:
ros2 pkg prefix <package_name>
is supposed to output the prefix path of a package. However, it seems to alway return the path to the install folder (not sure if this is a bug).Calling ros2
cli tool without arguments throws an error instead of listing available commands.
Required Info:
$ ros2
$ ros2
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
<<<LIST OF COMMANDS>>>
$ ros2
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: the following arguments are required: Call `ros2 <command> -h` for more detailed usage.
It looks like this is being passed as the metavar
instead of the help text to the argument parser.
ros2cli/ros2cli/ros2cli/command/__init__.py
Lines 92 to 95 in a4e00b2
Required Info:
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run demo_nodes_cpp talker
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 topic echo /chatter
Constant output of the data
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 topic echo /chatter
data: 'Hello World: 6'
deserialize from cdr buffer failed
When running the listener accordingly to it, all data seems to be received correctly.
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run demo_nodes_cpp listener
RMW_IMPLEMENTATION=rmw_connext_cpp ros2 run demo_nodes_py listener
It also runs correctly when using fastrtps:
RMW_IMPLEMENTATION=rmw_fastrtps_cpp ros2 topic echo /chatter
Currently you can only get a package's installation prefix with this command using ros2 pkg prefix <package name>
, but it would be convenient to be able to get at least the "share" directory of the package directly, if not others as well, i.e. <install prefix>/share/<package name>
rather than just <install prefix>
.
The command could either be ros2 pkg share <package name>
or something like ros2 pkg prefix --share <package name>
instead.
I downloaded a packaging archive built with colcon and after sourcing the setup.bash
I don't get argcomplete functionality for ros2cli
(whereas if the workspace is built with ament_tools I do). (@wjwwood encountered this earlier today too from source)
Does colcon not process the AMENT_ENVIRONMENT_HOOKS maybe? (maybe we're aware of this already and it is fine to leave it as an enhancement)
I put a debug print in https://github.com/ros2/ros2cli/blob/dace3ce49154203ca270a412229a2eec8b85619f/ros2cli/completion/ros2-argcomplete.bash and confirmed that the message gets printed for old archives built with ament_tools but not for recent archives built with colcon.
$ ros2 lifecycle set -h
usage: ros2 lifecycle set [-h] [--spin-time SPIN_TIME]
[--include-hidden-nodes]
node_name transition
Trigger lifecycle state transition
positional arguments:
node_name Name of the ROS node
transition The lifecycle transition
Users don't know is a transition / acceptable transition.
You need to call and fail to get more information:
$ ros2 lifecycle set lc_talker garbage
Unknown transition requested, available ones are:
- configure [1]
- configure_success [10]
- configure_failure [11]
- configure_error [22]
- cleanup [2]
- cleanup_success [20]
- cleanup_failure [21]
- cleanup_error [22]
- activate [3]
- activate_success [30]
- activate_failure [31]
- activate_error [32]
- deactivate [4]
- deactivate_success [40]
- deactivate_failure [41]
- deactivate_error [42]
- unconfigured_shutdown [50]
- inactive_shutdown [51]
- active_shutdown [52]
- shutdown_success [53]
- shutdown_failure [54]
- shutdown_error [55]
- errorprocessing_success [60]
- errorprocessing_failure [61]
- errorprocessing_error [62]
And that list gives all transitions, not only the ones that are available from the current state.
Suggestions to improve user experience:
get_available_transitions
through ros2 lifecycle (as a new verb?) and update the set
help message to advise users to call that to know the possible transitions.I've been testing fastrtps and opensplice in parallel environments on the same machine.
Testing (fastrtps) ros2 node list
I noticed that the list had a lot of extra padding.
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 node list
lc_listener
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>
vs
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 node list
lc_listener
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 daemon stop
When I restarted things again it went away. But after some more testing it came back. What I found was that the extra newlines come in when the daemon is the opensplice implementation's version.
It took me a while to figure this out as daemon status
will report running if either implementations daemon is running.
But daemon stop
will only stop the environment's version of the daemon, and refuse to stop the other one.
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 daemon stop
Failed to shutdown daemon, it might be using a different rmw implementation
I'm not sure on the design goal of whether the daemon's are supposed to be implementation agnostic and ticket the different behavior between them. Or whether we should instead work to silo them so that we don't get cross talking behavior and each implementation runs it's own daemon in parallel.
If I immediately call status
after start
the daemon it does not report as running. It's slow enough I can reproduce it on the commandline with typed commands. If you poll a second later it reports as running. This was confusing when I didn't poll a 2nd time, and can lead to users and tools to multiply start the daemon and/or debug why the daemon isn't starting when it actually is.
It would be good to immediately report that the daemon is up, instead of having a delay before reporting it's running.
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 daemon start
The daemon has been started
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 daemon status
The daemon is not running
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 daemon status
The daemon is running
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 daemon stop
The daemon has been stopped
C:\Users\OSRF\Downloads\ardent_fastrtps\ros2-windows>ros2 daemon status
The daemon is not running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is not running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon start
The daemon has been started
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is not running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon stop
The daemon has been stopped
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is not running
Working from binaries, if the default rmw_implementation is removed and the ros2 tools invoked without specifying the RMW_IMPLEMENTATION the tools crash with a Traceback without useful error message.
root@10328256cca9:~# ros2 topic list
Traceback (most recent call last):
File "/opt/ros/bouncy/bin/ros2", line 11, in <module>
load_entry_point('ros2cli==0.5.2', 'console_scripts', 'ros2')()
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/cli.py", line 69, in main
rc = extension.main(parser=parser, args=args)
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2topic/command/topic.py", line 43, in main
return extension.main(args=args)
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2topic/verb/list.py", line 34, in main
with NodeStrategy(args) as node:
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/strategy.py", line 29, in __init__
spawn_daemon(args)
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/daemon.py", line 72, in spawn_daemon
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1275, in _execute_child
restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not NoneType
root@10328256cca9:~# ros2 node list
Traceback (most recent call last):
File "/opt/ros/bouncy/bin/ros2", line 11, in <module>
load_entry_point('ros2cli==0.5.2', 'console_scripts', 'ros2')()
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/cli.py", line 69, in main
rc = extension.main(parser=parser, args=args)
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2node/command/node.py", line 39, in main
return extension.main(args=args)
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2node/verb/list.py", line 34, in main
with NodeStrategy(args) as node:
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/strategy.py", line 29, in __init__
spawn_daemon(args)
File "/opt/ros/bouncy/lib/python3.6/site-packages/ros2cli/node/daemon.py", line 72, in spawn_daemon
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL, **kwargs)
File "/usr/lib/python3.6/subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.6/subprocess.py", line 1275, in _execute_child
restore_signals, start_new_session, preexec_fn)
TypeError: expected str, bytes or os.PathLike object, not NoneType
How to reproduce:
$ docker run -it --rm osrf/ros2:bouncy-basic
# apt update && apt install -y ros-bouncy-rmw-opensplice-cpp
# apt remove ros-bouncy-rmw-fastrtps-cpp -y && apt autoremove -y
# source /opt/ros/bouncy/setup.bash
# ros2 node list
I am having a hard time publishing PoseWithCovarianceStamped
messages for the AMCL demo in ROS 2. I thought I was doing something wrong with JSON formatting, but it happens even with #19 that switches to YAML parsing.
I've narrowed it down to a simpler problem: I can't publish Point
messages.
Publishing the same message with ROS 1's rostopic pub
works fine, using the autocompleted template from ROS 1. But it errors in ROS 2:
ros2 topic pub initialpose geometry_msgs/Point "x: 0.0
y: 0.0
z: 0.0"
Failed to load entry point 'pub': EOL while scanning string literal (pub.py, line 72)
usage: ros2 topic [-h] [--include-hidden-topics]
Call `ros2 topic <command> -h` for more detailed usage. ...
ros2 topic: error: argument Call `ros2 topic <command> -h` for more detailed usage.: invalid choice: 'pub' (choose from 'echo', 'list')
It must need to be formatted differently to ROS 1, but I have run out of ideas!
There's still probably user error on my part but if someone has suggestions I'd appreciate it.
ros2 topic pub initialpose geometry_msgs/PoseWithCovarianceStamped "header:
stamp:
sec: 0
nanosec: 0
frame_id: 'map'
pose:
pose:
position: {x: 5.5, y: 4.5, z: 0.0}
orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}
covariance: [0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.5, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
0.0, 0.0, 0.0, 0.0, 0.0, 0.5]"
Traceback (most recent call last):
File "/home/dhood/ros2_ws/install_isolated/ros2cli/bin/ros2", line 11, in <module>
load_entry_point('ros2cli==0.0.0', 'console_scripts', 'ros2')()
File "/home/dhood/ros2_ws/install_isolated/ros2cli/lib/python3.5/site-packages/ros2cli/cli.py", line 64, in main
rc = extension.main(parser=parser, args=args)
File "/home/dhood/ros2_ws/install_isolated/ros2topic/lib/python3.5/site-packages/ros2topic/command/topic.py", line 38, in main
return extension.main(args=args)
File "/home/dhood/ros2_ws/install_isolated/ros2topic/lib/python3.5/site-packages/ros2topic/verb/pub.py", line 43, in main
return main(args)
File "/home/dhood/ros2_ws/install_isolated/ros2topic/lib/python3.5/site-packages/ros2topic/verb/pub.py", line 47, in main
publisher(args.message_type, args.topic_name, args.values)
File "/home/dhood/ros2_ws/install_isolated/ros2topic/lib/python3.5/site-packages/ros2topic/verb/pub.py", line 69, in publisher
setattr(msg, field_name, field_type(field_value))
TypeError: __init__() takes 1 positional argument but 2 were given
Currently, the ros2 pkg
command has a way to list all packages, but not a way to list all executables that are available in a package. I think it would be a good idea to be able to list all of the executables to make it easier for the user to find that list.
https://ci.ros2.org/job/ci_linux-aarch64/1426/testReport/
./ros2cli/plugin_system.py:63:5: F841 local variable 'e' is assigned to but never used
except PluginException as e:
^
./ros2cli/plugin_system.py:68:5: F841 local variable 'e' is assigned to but never used
except Exception as e:
^
./ros2cli/entry_points.py:86:9: F841 local variable 'e' is assigned to but never used
except Exception as e:
^
3 F841 local variable 'e' is assigned to but never used
22 files checked
3 errors
Required Info:
ros2 run demo_nodes_cpp talker __ns:=/demo
ros2 param list
the 'ros2 param list' stuck forever with out output any message
'ros2 param set/get' also failed
After using the ros2 cli the daemon prevents a rebuild from completing successfully on windows.
A way to have introspection as to the cause of this failure would be very helpful. Or else a workaround that would allow the build to request the daemon to shutdown or other technique to not block the build would provide a better user experience.
CMake Error at cmake_install.cmake:46 (file):
file INSTALL cannot copy file "C:/dev/ros2/build/rcl/Release/rcl.dll" to
"C:/dev/ros2/install/bin/rcl.dll".
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command "
setlocal\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program F
iles\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorleve
l% neq 0 goto :cmEnd\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd\r [C:\
dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & ca
ll :cmErrorLevel %errorlevel% & goto :cmDone\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1\r
[C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone\r [C:
\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorleve
l% neq 0 goto :VCEnd\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exite
d with code 1. [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
Done Building Project "C:\dev\ros2\build\rcl\INSTALL.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\dev\ros2\build\rcl\INSTALL.vcxproj" (default target) (1) ->
(PostBuildEvent target) ->
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: The command
"setlocal\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: "C:\Program F
iles\CMake\bin\cmake.exe" -DBUILD_TYPE=Release -P cmake_install.cmake\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorleve
l% neq 0 goto :cmEnd\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmEnd\r [C:\
dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: endlocal & ca
ll :cmErrorLevel %errorlevel% & goto :cmDone\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmErrorLevel
\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: exit /b %1\r
[C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :cmDone\r [C:
\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: if %errorleve
l% neq 0 goto :VCEnd\r [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(133,5): error MSB3073: :VCEnd" exite
d with code 1. [C:\dev\ros2\build\rcl\INSTALL.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:04.53
This happened once when I was testing. I'd run the command before and after successfully.
Using rmw_connext_cpp
C:\dev\ros2>ros2 topic list
Traceback (most recent call last):
File "C:\dev\ros2\install\bin\ros2-script.py", line 11, in <module>
load_entry_point('ros2cli==0.0.0', 'console_scripts', 'ros2')()
File "C:\dev\ros2\install\Lib\site-packages\ros2cli\cli.py", line 64, in main
rc = extension.main(parser=parser, args=args)
File "C:\dev\ros2\install\Lib\site-packages\ros2topic\command\topic.py", line 38, in main
return extension.main(args=args)
File "C:\dev\ros2\install\Lib\site-packages\ros2topic\verb\list.py", line 34, in main
with NodeStrategy(args) as node:
File "C:\dev\ros2\install\Lib\site-packages\ros2cli\node\strategy.py", line 33, in __enter__
self.node.__enter__()
File "C:\dev\ros2\install\Lib\site-packages\ros2cli\node\daemon.py", line 67, in __enter__
methods = self._proxy.system.listMethods()
File "C:\Python36\lib\xmlrpc\client.py", line 1112, in __call__
return self.__send(self.__name, args)
File "C:\Python36\lib\xmlrpc\client.py", line 1452, in __request
verbose=self.__verbose
File "C:\Python36\lib\xmlrpc\client.py", line 1154, in request
return self.single_request(host, handler, request_body, verbose)
File "C:\Python36\lib\xmlrpc\client.py", line 1166, in single_request
http_conn = self.send_request(host, handler, request_body, verbose)
File "C:\Python36\lib\xmlrpc\client.py", line 1279, in send_request
self.send_content(connection, request_body)
File "C:\Python36\lib\xmlrpc\client.py", line 1309, in send_content
connection.endheaders(request_body)
File "C:\Python36\lib\http\client.py", line 1234, in endheaders
self._send_output(message_body, encode_chunked=encode_chunked)
File "C:\Python36\lib\http\client.py", line 1026, in _send_output
self.send(msg)
File "C:\Python36\lib\http\client.py", line 964, in send
self.connect()
File "C:\Python36\lib\http\client.py", line 936, in connect
(self.host,self.port), self.timeout, self.source_address)
File "C:\Python36\lib\socket.py", line 722, in create_connection
raise err
File "C:\Python36\lib\socket.py", line 713, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] No connection could be made because the target machine actively refused it
When attempting to pass command line arguments to a node using the ros2 run [pkg] [exec] syntax, the arguments get processed by the ros2 executable rather than the node executable being launched.
Example:
$ ros2 run ros1_bridge dynamic_bridge --help
usage: ros2 run [-h] package_name executable_name [argv [argv ...]]
Run a package specific executable
positional arguments:
package_name Name of the ROS package
executable_name Name of the executable
argv Pass arbitrary arguments to the executable (use '--' before
these arguments to ensure they are not handle by this
command)
optional arguments:
-h, --help show this help message and exit
Expected output:
$ ./install/lib/ros1_bridge/dynamic_bridge --help
Usage:
-h, --help: This message.
--show-introspection: Print output of introspection of both sides of the bridge.
--print-pairs: Print a list of the supported ROS 2 <=> ROS 1 conversion pairs.
--bridge-all-topics: Bridge all topics in both directions, whether or not there is a matching subscriber.
--bridge-all-1to2-topics: Bridge all ROS 1 topics to ROS 2, whether or not there is a matching subscriber.
--bridge-all-2to1-topics: Bridge all ROS 2 topics to ROS 1, whether or not there is a matching subscriber.
Although I'm sure you get the picture, here's another example:
$ ros2 run ros1_bridge dynamic_bridge --bridge-all-topics
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: unrecognized arguments: --bridge-all-topics
Add one passing just a flag:
$ ros2 run ros1_bridge dynamic_bridge -f
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: unrecognized arguments: -f
Arguments that are not prefixed with one or more dashes do allow the node to get executed (although I don't have evidence at the moment that they successfully get passed to the node).
E.g., (I don't have a master running, but it runs the bridge)
$ ros2 run ros1_bridge dynamic_bridge this_is_an_argument another arg3
[ERROR] [1499788917.336544285] [/ros_bridge]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying...
It would be good when the user sources /opt/ros/<distro>/setup.bash
that the environment hook for the completion is implicitly included.
Reproduce with: ros2 service call /add_two_ints example_interfaces/AddTwoInts
when no server is around, then ctrl-c it after it has sent the request. I get a core dump like in https://gist.github.com/dhood/ea5efa71ad2b3fa47a8942058f2de82a:
$ ros2 service call /add_two_ints example_interfaces/AddTwoInts
requester: making request: example_interfaces.srv.AddTwoInts_Request(a=0, b=0)
^C*** Error in `/usr/bin/python3': double free or corruption (fasttop): 0x00000000031b7530 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7ff74a28d7e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x8037a)[0x7ff74a29637a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7ff74a29a53c]
/home/dhood/ros2_ws/install_isolated/rclpy/lib/python3.5/site-packages/rclpy/_rclpy.cpython-35m-x86_64-linux-gnu.so(+0x8129)[0x7ff7477a2129]
/usr/bin/python3(PyCFunction_Call+0x4f)[0x4e9b9f]
/usr/bin/python3(PyEval_EvalFrameEx+0x614)[0x524414]
/usr/bin/python3(PyEval_EvalFrameEx+0x4a14)[0x528814]
/usr/bin/python3(PyEval_EvalCodeEx+0x13b)[0x52e12b]
/usr/bin/python3[0x4ebcc3]
/usr/bin/python3(PyObject_Call+0x47)[0x5b7167]
...
This does not occur with ros2 run demo_nodes_py add_two_ints_client
but I still haven't found what the significant difference is. I even tried pasting the add_two_ints_client
main in place of
add_two_ints_client
, on the other hand, gives:
$ ros2 run demo_nodes_py add_two_ints_client
^CTraceback (most recent call last):
File "/home/dhood/ros2_ws/install_isolated/demo_nodes_py/lib/demo_nodes_py/add_two_ints_client", line 11, in <module>
load_entry_point('demo-nodes-py==0.0.0', 'console_scripts', 'add_two_ints_client')()
File "/home/dhood/ros2_ws/install_isolated/demo_nodes_py/lib/python3.5/site-packages/demo_nodes_py/services/add_two_ints_client.py", line 39, in main
node.destroy_node()
File "/home/dhood/ros2_ws/install_isolated/rclpy/lib/python3.5/site-packages/rclpy/node.py", line 266, in destroy_node
_rclpy.rclpy_destroy_node_entity(cli.client_handle, self.handle)
RuntimeError: Failed to fini 'rcl_client_t': rcl node is invalid, rcl instance id does not match, at /home/dhood/ros2_ws/src/ros2/rcl/rcl/src/rcl/node.c:374
Exception ignored in: <bound method Node.__del__ of <rclpy.node.Node object at 0x7fb28263ce80>>
Traceback (most recent call last):
File "/home/dhood/ros2_ws/install_isolated/rclpy/lib/python3.5/site-packages/rclpy/node.py", line 295, in __del__
self.destroy_node()
File "/home/dhood/ros2_ws/install_isolated/rclpy/lib/python3.5/site-packages/rclpy/node.py", line 266, in destroy_node
_rclpy.rclpy_destroy_node_entity(cli.client_handle, self.handle)
RuntimeError: Failed to fini 'rcl_client_t': rcl node is invalid, rcl instance id does not match, at /home/dhood/ros2_ws/src/ros2/rcl/rcl/src/rcl/node.c:374
Perhaps ros2 service call
doesn't manage to catch the exceptions which is how it gets into trouble.
This specific error will probably go away when we use wait for service, but I'm opening this because conceptually there might be something off if the command line tools give different behaviour to the demos that do the same.
With ros2 packages from debians, without having sourced the r2b2/setup.bash, the ros2
console script is on the path but not the rest of ros2cli
. So, if you haven't sourced the setup.bash, you get:
<new terminal>
root@87c44666d4d5:/# ros2 run demo_nodes_py talker_qos
Traceback (most recent call last):
File "/usr/bin/ros2", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2927, in <module>
@_call_aside
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2913, in _call_aside
f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 2940, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 635, in _build_master
ws.require(__requires__)
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 943, in require
needed = self.resolve(parse_requirements(requirements))
File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 829, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'ros2cli==0.0.0' distribution was not found and is required by the application
root@87c44666d4d5:/# . /opt/ros/r2b2/setup.bash
root@87c44666d4d5:/# ros2 run demo_nodes_py talker_qos
Best effort publisher
Publishing: "Hello World: 0"
Publishing: "Hello World: 1"
Publishing: "Hello World: 2"
I understand that the console script is auto-generated, but if there's a way around this it will improve user experience since I expect this to happen to people quite often.
Required Info:
ros2 pkg create a_new_package
Not sure, but the help text from ros2 pkg create -h
seems to indicate this is a valid call.
>ros2 pkg create a_new_package
Traceback (most recent call last):
File "C:\dev\ros2-windows\Scripts\ros2-script.py", line 11, in <module>
load_entry_point('ros2cli==0.4.0', 'console_scripts', 'ros2')()
File "C:\dev\ros2-windows\Lib\site-packages\ros2cli\cli.py", line 69, in main
rc = extension.main(parser=parser, args=args)
File "C:\dev\ros2-windows\Lib\site-packages\ros2pkg\command\pkg.py", line 39, in main
return extension.main(args=args)
File "C:\dev\ros2-windows\Lib\site-packages\ros2pkg\verb\create.py", line 88, in main
stdout=subprocess.PIPE)
File "c:\python36\lib\subprocess.py", line 709, in __init__
restore_signals, start_new_session)
File "c:\python36\lib\subprocess.py", line 997, in _execute_child
startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
I love this program 😀 !! it's awesome! But maybe I'm doing something wrong, but if nobody is publishing anything and I type ros2 topic list
, I get this:
mquigley@feather2:~/ros2$ ros2 topic list
Traceback (most recent call last):
File "/home/mquigley/ros2/install/bin/ros2", line 9, in <module>
load_entry_point('ros2cli', 'console_scripts', 'ros2')()
File "/home/mquigley/ros2/build/ros2cli/ros2cli/cli.py", line 64, in main
rc = extension.main(parser=parser, args=args)
File "/home/mquigley/ros2/build/ros2topic/ros2topic/command/topic.py", line 38, in main
return extension.main(args=args)
File "/home/mquigley/ros2/build/ros2topic/ros2topic/verb/list.py", line 41, in main
no_demangle=args.no_demangle)
File "/home/mquigley/ros2/build/ros2topic/ros2topic/api/__init__.py", line 20, in get_topic_names_and_types
topic_names_and_types = node.get_topic_names_and_types(no_demangle=no_demangle)
TypeError: __call__() got an unexpected keyword argument 'no_demangle'
There is currently no support for ament_python
in ros2 pkg create
. It defaults to ament_cmake
, but there is no automated way to create python packages.
Required Info:
set RMW_IMPLEMENTATION=rmw_connext_cpp
ros2 daemon stop
ros2 daemon start
Daemon would start in background with no additional windows.
A new terminal windows appears with the path to python.exe in the title.
This only happens using connext. With opensplice and fast-rtps the daemon starts without a new window appearing.
Closing the window and then calling ros2 daemon status
says the daemon is stopped, so the lifetime of the daemon appears to be tied to this new window
Right now these tools autopopulate the topic / service name based on the discovered topics / services, but dont populate the type.
The structure used (topic/service_names_and_types) also provides the types so we should autocomplete the type matching the selected name.
If no type matching the name is found in the structure we should apply the same logic as the service/message completer used for ros2msg/ros2srv to complete based on the interfaces installed on the system
@dirk-thomas I can't see/use any of the arguments listed in https://github.com/ros2/ros2cli/blob/3514151736746bf50cb04912b68dbd2e60d25e88/ros2cli/ros2cli/daemon/__init__.py with the daemon commands.
Is this the expected usage?
$ ros2 daemon start --rmw-implementation rmw_fastrtps_cpp --timeout 30 --ros-domain-id 70
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2: error: unrecognized arguments: --rmw-implementation rmw_fastrtps_cpp --timeout 30 --ros-domain-id 70
$ ros2 daemon -h
usage: ros2 daemon [-h]
Call `ros2 daemon <command> -h` for more detailed usage.
...
Various daemon related sub-commands
optional arguments:
-h, --help show this help message and exit
Commands:
start Start the daemon if it isn't running
status Output the status of the daemon
stop Stop the daemon if it is running
Call `ros2 daemon <command> -h` for more detailed usage.
$ ros2 daemon start -h
usage: ros2 daemon start [-h]
Start the daemon if it isn't running
optional arguments:
-h, --help show this help message and exit
using an archive on os x
Requires ros2/rmw#142
I first noticed this running a node with a remapped namespace, but it also happens if I hard-code a namespace. It happens:
E.g.:
$ ros2 run demo_nodes_cpp talker # (modified to use hard-coded namespace)
[INFO] [my_ns.talker]: Publishing: 'Hello World: 1'
$ ros2 node list
talker
I would consider this a bug because I expected the output to include the node's namespace, unless we are aware that this is not supported?
Working to reproduce #72 I've been bringing up and down the daemon a lot. I ran into this sequence where the daemon failed to stop but didn't report as such.
Possibly we need similar behavior to #71 on stop too?
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 node list
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 node list
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon stop
The daemon has been stopped
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon stop
The daemon has been stopped
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>ros2 daemon status
The daemon is not running
C:\Users\OSRF\Downloads\ardent_opensplice\ros2-windows>
Without quotes: OK
$ ros2 topic pub /chatter std_msgs/String '{"data":"Hello World"}'
publisher: beginning loop
publishing std_msgs.msg.String(data='Hello World'
With escaped double quotes: OK
$ ros2 topic pub /chatter std_msgs/String '{"data":"Hello\"World"}'
publisher: beginning loop
publishing std_msgs.msg.String(data='Hello"World')
With unescaped single quotes: Doesn't work
$ ros2 topic pub /chatter std_msgs/String '{"data":"Hello'World"}'
>
With unescaped single quotes: Doesn't work
$ ros2 topic pub /chatter std_msgs/String '{"data":"Hello\'World"}'
>
I didn't have pyyaml
installed and got this error:
$ ros2 run demos_nodes_cpp listener
Failed to load entry point 'echo': No module named 'yaml'
I am adding python3 -m pip install pyyaml
to the installation instructions, but I noticed it's not listed in the setup.py for ros2topic
where I think it should be. Is that correct?
Required Info:
ros2 run demo_nodes_cpp ros2param -- list /
Not sure.
ros2param.exe has stopped working
Not from source, so unable to get a meaningful stack trace.
Required Info:
REM Make sure daemon is using opensplice
set RMW_IMPLEMENTATION=rmw_opensplice_cpp
ros2 daemon stop
ros2 daemon start
ros2 run demo_nodes_cpp talker
REM in another terminal
ros2 topic echo chatter
Messages would be echo'd on second terminal
>ros2 topic echo chatter
========================================================================================
Context : DDS::WaitSet::detach_condition
Date : Fri Jun 22 16:01:21 Pacific Daylight Time 2018
Node : DESKTOP-S5KSNBT
Process : python.exe <4384>
Thread : 1544
Internals : WaitSet.cpp/456/6.7.180404OSS/5926d257/5926d257/-1
----------------------------------------------------------------------------------------
Report : Precondition not met: This ReadCondition is being deleted.
Internals : DDS::OpenSplice::ReadCondition::wlReq_detachFromWaitset/ReadCondition.cpp/176/4/1529708482.015405000
Failed to wait on wait set: failed to detach guard condition, at C:\J\workspace\packaging_windows\ws\src\ros2\rmw_opensplice\rmw_opensplice_cpp\src\rmw_wait.cpp:282, at C:\J\workspace\packaging_windows\ws\src\ros2\rcl\rcl\src\rcl\wait.c:647
Not a major issue but something we should look into eventually:
built from source with fastrtps on linux:
<ros2 run demo_nodes_cpp add_two_ints_server>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list
add_two_ints_server
<kill server node>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list
<start it again>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list
add_two_ints_server
<kill it again>
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$ ros2 node list
dhood@osrf-esteve:~/ros2_ardent [ros2_ardent]$
built from source with connext on osx:
$ RMW_IMPLEMENTATION=rmw_connext_cpp ros2 node list
REDAWorker_enterExclusiveArea:worker U00007fff7a779300 deadlock risk: cannot enter 0x7fa690f9c770 of level 40 from level 40
REDACursor_modifyReadWriteArea:!enter worker (U00007fff7a779300)'s exclusive area
PRESPsService_removeRemoteEndpoint:!modify pres psRemoteWriter
REDAWorker_enterExclusiveArea:worker U00007fff7a779300 deadlock risk: cannot enter 0x7fa690f9c770 of level 40 from level 40
REDACursor_modifyReadWriteArea:!enter worker (U00007fff7a779300)'s exclusive area
PRESPsService_removeRemoteEndpoint:!modify pres psRemoteReader
add_two_ints_server
(no name)
(no name)
(no name)
(no name)
the (no name)
output comes from this line in rmw_connext_cpp:
https://github.com/ros2/rmw_connext/blob/efaf513a5f9303216670ed76b5060ed5b8f958e5/rmw_connext_shared_cpp/src/node_names.cpp#L76
Perhaps this equivalent in fastrtps can return empty names: https://github.com/ros2/rmw_fastrtps/blob/3e5edb3316e2aee325e9354549e54c999a89bca9/rmw_fastrtps_cpp/src/rmw_node_names.cpp#L56
I haven't seen opensplice output empty lines.
Required Info:
In one terminal
ros2 topic pub /test_topic std_msgs/String "{data: Hello world}"
In another
ros2 topic echo test_topic
I'd expect a subscription to /test_topic
C:\Users\osrf>ros2 topic echo test_topic
Could not determine the type for the passed topic
Giving a fully qualified name works
C:\Users\osrf>ros2 topic echo /test_topic
data: Hello world
I'd expect test_topic
to be expanded to /test_topic
and have the same behavior as if a FQN had been provided.
http://design.ros2.org/articles/topic_and_service_names.html
After running a ros2 topic ...
command in a command prompt on Windows, the command prompt will hang when you type exit
. This is because the daemon is somehow still attached to the command prompt I think.
This isn't a great user experience, and I wouldn't have know without deep knowledge about what's going on. I'm not sure if we can run the daemon in a way that avoids this or not, but it would be good if we could.
Please add an option to show the number of publishers and subscribers on each topic as part listing them.
I am debugging something and want to switch rmw implementation for the new CLI tools.
I noticed RMW_IMPLEMENTATION=rmw_connext_cpp ros2 node list
was not outputting the connext license. I figured it was because of ros2/rmw_implementation#23 and that it was using fastrtps underneath.
However, I have built with connext support, and even the following doesn't output the connext license:
RMW_IMPLEMENTATION=rmw_connext_cpp RCL_ASSERT_RMW_ID_MATCHES=rmw_connext_cpp ros2 node list
@wjwwood told me this is because the daemon is started once and then not communicated to using DDS, so the assertion is never checked anywhere.
Ideally I would expect RMW_IMPLEMENTATION=rmw_connext_cpp ros2 node list
to use connext. But at the very least I would expect it to not ignore the RCL_ASSERT_RMW_ID_MATCHES=rmw_connext_cpp
environment variable.
I understand why this happens, it's just misleading as a user expecting to have control over those things like for other participants.
How have people been testing ros2 pkg create
? I tried to run it but the templates aren't installed so I get:
$ ros2 pkg create dummy_package --license asdf
going to create a new package
package name: dummy_package
destination directory: /tmp
package format: 2
version: 0.0.0
description: TODO: Package description
maintainer: ['dhood <[email protected]>']
licenses: ['asdf']
build type: ament_cmake
dependencies: []
creating folder ./dummy_package
Traceback (most recent call last):
File "/home/dhood/ros2_ws/install_isolated/ros2cli/bin/ros2", line 11, in <module>
load_entry_point('ros2cli==0.4.0', 'console_scripts', 'ros2')()
File "/home/dhood/ros2_ws/install_isolated/ros2cli/lib/python3.5/site-packages/ros2cli/cli.py", line 69, in main
rc = extension.main(parser=parser, args=args)
File "/home/dhood/ros2_ws/install_isolated/ros2pkg/lib/python3.5/site-packages/ros2pkg/command/pkg.py", line 39, in main
return extension.main(args=args)
File "/home/dhood/ros2_ws/install_isolated/ros2pkg/lib/python3.5/site-packages/ros2pkg/verb/create.py", line 154, in main
create_package_environment(package, args.destination_directory)
File "/home/dhood/ros2_ws/install_isolated/ros2pkg/lib/python3.5/site-packages/ros2pkg/api/create.py", line 97, in create_package_environment
package_xml_config)
File "/home/dhood/ros2_ws/install_isolated/ros2pkg/lib/python3.5/site-packages/ros2pkg/api/create.py", line 71, in _create_template_file
raise FileNotFoundError('template not found:', template_path)
FileNotFoundError: [Errno template not found:] /home/dhood/ros2_ws/install_isolated/ros2pkg/lib/python3.5/site-packages/ros2pkg/resource/package_environment/package.xml.em
Do I need to run it from a particular directory or anything? Or do we just need to install the resource files (I don't see how they are being installed currently).
I am posing this as a question because it might be user error, given that I am the first one to run into it when it seems that others were testing it out in #42
It does work if we install argcomplete from pip. It is probably worthwhile to explore why this is and if we can make it work with the Xenial argcomplete.
When I try to use big data message by python code such as Camera Image or PointCloud2 on ROS2, I found the performance is terrible.
Problem:
Launch ros2_intel_realsense 2 by realsense_ros2_camera, and subscribe “/camera/depth/color/points” by “ros2 topic echo /camera/depth/color/points”. It will cost dozens of seconds to print out the PointCloud2 (640x480) data. On ros 1, rostopic shows data immediately.
Then I have wrote test code rttest_sample 2 to publish PointCloud2 on topic /rttest_sample. the result is:
Set data size as 64x48, “ros2 topic echo /rttest_sample” works.
Set data size as 640x48, “ros2 topic echo /rttest_sample” cost ~10s.
Set data size as 640x480, “ros2 topic echo /rttest_sample” cost more than 60s.
Issue discussing here: https://discourse.ros.org/t/image-and-pointcloud2-performance-on-ros2/5391
Required Info:
Run subscriber old school
ros2 run examples_rclpy_minimal_subscriber subscriber_old_school
CTRL
+ c
. Sometimes there is a crash instead of a clean shutdown.
Executable would shut down cleanly.
C:\dev\ros2-windows>ros2 run examples_rclpy_minimal_subscriber subscriber_old_school
[INFO] [minimal_subscriber]: I heard: "Hello World: 64"
[INFO] [minimal_subscriber]: I heard: "Hello World: 65"
[INFO] [minimal_subscriber]: I heard: "Hello World: 66"
[INFO] [minimal_subscriber]: I heard: "Hello World: 0"
[INFO] [minimal_subscriber]: I heard: "Hello World: 1"
[INFO] [minimal_subscriber]: I heard: "Hello World: 2"
[INFO] [minimal_subscriber]: I heard: "Hello World: 0"
[INFO] [minimal_subscriber]: I heard: "Hello World: 1"
[INFO] [minimal_subscriber]: I heard: "Hello World: 2"
========================================================================================
Context : DDS::WaitSet::wait
Date : Mon Jun 25 17:50:55 Pacific Daylight Time 2018
Node : DESKTOP-S5KSNBT
Process : python.exe <3116>
Thread : 2992
Internals : WaitSet.cpp/252/6.7.180404OSS/5926d257/5926d257/-1
----------------------------------------------------------------------------------------
Report : Already deleted: Object is already deleted.
Internals : DDS::OpenSplice::CppSuperClass::check/CppSuperClass.cpp/232/9/1529974255.092807600
----------------------------------------------------------------------------------------
Report : Precondition not met: Waitset is already deleted
Internals : u_waitsetWaitAction2/u_waitset.c/333/782/1529974255.102913900
ros2 topic pub /chatter test_msgs/DynamicArrayNested "{primitive_values: [{string_value: 'foo', int8_value: 42}]}"
Populate and send a DynamicArrayNested message with the following content:
test_msgs.msg.DynamicArrayNested(primitive_values=[test_msgs.msg.Primitives(bool_value=False, byte_value=b'\x00', char_value='\x00', float32_value=0.0, float64_value=0.0, int8_value=42, uint8_value=0, int16_value=0, uint16_value=0, int32_value=0, uint32_value=0, int64_value=0, uint64_value=0, string_value='foo')])
$ ros2 topic pub /chatter test_msgs/DynamicArrayNested "{primitive_values: [{string_value: 'foo', int8_value: 1}]}"
Failed to populate field 'primitive_values': The 'primitive_values' field must be a set or sequence and each value of type 'Primitives'
The tool has currently no way of knowing what type the fields of the array should be. See ros2/rosidl#243 for more information about the features required to get this working
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.