Closed lyc-king closed 3 years ago
Since you are using Dashing and not Foxy, the launch params may be slightly different. See this discussion. So try changing "executable" to "node_executable"
Thanks for your suggestion and it works but there is a ModuleNotFoundError and afterwards my Rviz2 also went wrong:
$ros2 launch urdf_tutorial demo.launch.py
[state_publisher-2] ModuleNotFoundError: No module named 'tf2_ros' [ERROR] [state_publisher-2]: process has died [pid 28602, exit code 1, cmd '/home/kumamon/dev_ws/install/urdf_tutorial/lib/urdf_tutorial/state_publisher'].
$rviz2 -d ~/dev_ws/install/urdf_tutorial/share/urdf_tutorial/r2d2.rviz
[INFO] [rviz2]: Stereo is NOT SUPPORTED [INFO] [rviz2]: OpenGl version: 4.6 (GLSL 4.6) [INFO] [rviz2]: Stereo is NOT SUPPORTED [ERROR] [rviz2]: PluginlibFactory: The plugin for class 'rviz_default_plugins/Interact' failed to load. Error: According to the loaded plugin descriptions the class rviz_default_plugins/Interact with base class type rviz_common::Tool does not exist. Declared types are rviz_default_plugins/FocusCamera rviz_default_plugins/Measure rviz_default_plugins/MoveCamera rviz_default_plugins/PublishPoint rviz_default_plugins/Select rviz_default_plugins/SetGoal rviz_default_plugins/SetInitialPose _[WARN] [rcl.loggingrosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic. Parsing robot urdf xml string.
Besides, I met similar warnings when loading other URDF files from UR5 or Turtlebot3 etc. What does it mean by "Publisher already registered for provided node name"? Maybe I should reinstall my Rviz2?
Dashing is 2 versions behind Foxy, so I'm not surprised there would be many differences you will need to resolve. If you can, upgrade to Foxy. Unfortunately I can't help you any further on this.
OK, I will try. I really appreciate your help and explanation!
Dashing is 2 versions behind Foxy, so I'm not surprised there would be many differences you will need to resolve. If you can, upgrade to Foxy. Unfortunately I can't help you any further on this.
OS: Ubuntu 18.04 ROS Version: Dashing
I have completed 1-6 steps mentioned in this tutorial and finally try to view the results. However, I got an unexpected error when running step 7: $ros2 launch urdf_tutorial demo.launch.py
[INFO] [launch]: All log files can be found below /home/kumamon/.ros/log/2021-01-26-20-28-15-083060-kumamon-Vostro-3668-4144 [INFO] [launch]: Default logging verbosity is set to INFO urdf_file_name : r2d2.urdf.xml [ERROR] [launch]: Caught exception in launch (see debug for traceback): init() missing 1 required keyword-only argument: 'node_executable'
It is weird since I failed again even if I downloaded whole source code directly from github website. Is there anyone who can solve the problem? Thank you so much for your help!