moveit / moveit2_tutorials

A sphinx-based centralized documentation repo for MoveIt 2
https://moveit.picknik.ai
BSD 3-Clause "New" or "Revised" License
163 stars 196 forks source link

Running launch file in examples/move_group_interface, there are two node with same name /rivz2 #991

Open MoonBunnyZZZ opened 6 days ago

MoonBunnyZZZ commented 6 days ago

Ubuntu: 22.04 ROS2: humble

code version repositories: launch_param_builder: type: git url: https://github.com/PickNikRobotics/launch_param_builder version: main moveit2: type: git url: https://github.com/ros-planning/moveit2 version: humble moveit_resources: type: git url: https://github.com/ros-planning/moveit_resources version: humble moveit_task_constructor: type: git url: https://github.com/ros-planning/moveit_task_constructor.git version: humble moveit_visual_tools: type: git url: https://github.com/ros-planning/moveit_visual_tools version: ros2 rosparam_shortcuts: type: git url: https://github.com/PickNikRobotics/rosparam_shortcuts version: ros2 srdfdom: type: git url: https://github.com/ros-planning/srdfdom.git version: ros2

After colcon building, run ' ros2 launch moveit2_tutorials move_group.launch.py'.There are two rviz2 node with same name. source install/setup.bash && ros2 node list

WARNING: Be aware that are nodes in the graph that share an exact name, this can have unintended side effects. /controller_manager /interactive_marker_display_104851965511536 /joint_state_broadcaster /move_group /move_group_private_102409399057152 /moveit_simple_controller_manager /panda_arm_controller /panda_hand_controller /robot_state_publisher /rviz2 /rviz2 /rviz2_private_133986940619904 /rviz2_private_133987075316320 /static_transform_publisher /transform_listener_impl_5d240bdc9c10 /transform_listener_impl_5f5cbfe8a610 /transform_listener_impl_5f5cbff94a90 /transform_listener_impl_79dc44167fd0 /transform_listener_impl_79dc4c0145e0

sea-bass commented 4 days ago

I just looked into this and turns out RViz starts up a handful of nodes with different names... but if you change the name in the launch file, it names them all the same: https://github.com/ros2/rviz/issues/671#issuecomment-825161259

It so turns out that the RViz nodes set up in the launch files are like this:

    rviz_node = Node(
        package="rviz2",
        executable="rviz2",
        name="rviz2",  # <-- THIS IS THE ISSUE
        output="log",
        arguments=["-d", rviz_config_file],
        parameters=[
            moveit_config.robot_description,
            moveit_config.robot_description_semantic,
            moveit_config.robot_description_kinematics,
            moveit_config.planning_pipelines,
            moveit_config.joint_limits,
        ],
    )

If you comment out the line shared above, it should all look good. I tested this on my end just now.

We should fix this in this repository by simply omitting the name="blah" remapping in all RViz launches.