Open Rudresh172 opened 10 months ago
Hey @fmauch,
I just saw that the ur_moveit.launch.py file needs to have 'tf_prefix' instead of 'prefix' while loading the urdf.
Now I am able to loading the model in the MoveIt Rviz window, but there are errors with the move group name. Here is the detailed log file -
ros2 launch ur_moveit_config ur_moveit.launch.py ur_type:=ur5e launch_rviz:=true prefix:=ur_
[INFO] [launch]: All log files can be found below /home/not_windows/.ros/log/2024-02-13-15-01-16-518239-LabTop3-23728
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [move_group-1]: process started with pid [23735]
[INFO] [rviz2-2]: process started with pid [23737]
[INFO] [servo_node_main-3]: process started with pid [23739]
[servo_node_main-3] [WARN] [1707832877.261940233] [moveit_servo.servo_node]: Intra-process communication is disabled, consider enabling it by adding:
[servo_node_main-3] extra_arguments=[{'use_intra_process_comms' : True}]
[servo_node_main-3] to the Servo composable node in the launch file
[move_group-1] [WARN] [1707832877.265416769] [move_group.move_group]: Falling back to using the the move_group node namespace (deprecated behavior).
[servo_node_main-3] [INFO] [1707832877.266593881] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00250802 seconds
[servo_node_main-3] [INFO] [1707832877.266622238] [moveit_robot_model.robot_model]: Loading robot model 'ur'...
[servo_node_main-3] [INFO] [1707832877.266628897] [moveit_robot_model.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[move_group-1] [INFO] [1707832877.267614946] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00204439 seconds
[move_group-1] [INFO] [1707832877.267637117] [moveit_robot_model.robot_model]: Loading robot model 'ur'...
[move_group-1] [INFO] [1707832877.267642805] [moveit_robot_model.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[servo_node_main-3] [WARN] [1707832877.275285098] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml!
[move_group-1] [WARN] [1707832877.278531714] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml!
[servo_node_main-3] [INFO] [1707832877.297968972] [moveit_ros.current_state_monitor]: Listening to joint states on topic '/joint_states'
[servo_node_main-3] [INFO] [1707832877.299760182] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/attached_collision_object' for attached collision objects
[servo_node_main-3] [INFO] [1707832877.299770213] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor
[servo_node_main-3] [INFO] [1707832877.300206367] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/planning_scene'
[servo_node_main-3] [INFO] [1707832877.300692758] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Publishing maintained planning scene on '/servo_node/publish_planning_scene'
[servo_node_main-3] [ERROR] [1707832877.301857138] [moveit_robot_model.robot_model]: Group 'ur_manipulator' not found in model 'ur'
[servo_node_main-3] [ERROR] [1707832877.301870332] [moveit_servo.servo_calcs]: Invalid move group name: `ur_manipulator`
[servo_node_main-3] terminate called after throwing an instance of 'std::runtime_error'
[servo_node_main-3] what(): Invalid move group name
[servo_node_main-3] Stack trace (most recent call last):
[servo_node_main-3] #14 Object "", at 0xffffffffffffffff, in
[servo_node_main-3] #13 Object "/opt/ros/humble/lib/moveit_servo/servo_node_main", at 0x555799a99ca4, in
[move_group-1] [INFO] [1707832877.311031193] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Publishing maintained planning scene on 'monitored_planning_scene'
[move_group-1] [INFO] [1707832877.311134441] [moveit.ros_planning_interface.moveit_cpp]: Listening to 'joint_states' for joint states
[move_group-1] [INFO] [1707832877.311377689] [moveit_ros.current_state_monitor]: Listening to joint states on topic 'joint_states'
[move_group-1] [INFO] [1707832877.311622305] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/attached_collision_object' for attached collision objects
[move_group-1] [INFO] [1707832877.311634405] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor
[move_group-1] [INFO] [1707832877.312076162] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/planning_scene'
[move_group-1] [INFO] [1707832877.312086905] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting world geometry update monitor for collision objects, attached objects, octomap updates.
[move_group-1] [INFO] [1707832877.312275122] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to 'collision_object'
[move_group-1] [INFO] [1707832877.312470476] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to 'planning_scene_world' for planning scene world geometry
[move_group-1] [WARN] [1707832877.312594560] [moveit.ros.occupancy_map_monitor.middleware_handle]: Resolution not specified for Octomap. Assuming resolution = 0.1 instead
[move_group-1] [ERROR] [1707832877.312600936] [moveit.ros.occupancy_map_monitor.middleware_handle]: No 3D sensor plugin(s) defined for octomap updates
[move_group-1] [INFO] [1707832877.314566063] [moveit.ros_planning_interface.moveit_cpp]: Loading planning pipeline 'move_group'
[move_group-1] [INFO] [1707832877.321876333] [moveit.ros_planning.planning_pipeline]: Using planning interface 'OMPL'
[move_group-1] [INFO] [1707832877.323314989] [moveit_ros.add_time_optimal_parameterization]: Param 'move_group.path_tolerance' was not set. Using default value: 0.100000
[move_group-1] [INFO] [1707832877.323326502] [moveit_ros.add_time_optimal_parameterization]: Param 'move_group.resample_dt' was not set. Using default value: 0.100000
[move_group-1] [INFO] [1707832877.323330032] [moveit_ros.add_time_optimal_parameterization]: Param 'move_group.min_angle_change' was not set. Using default value: 0.001000
[move_group-1] [INFO] [1707832877.323341480] [moveit_ros.fix_workspace_bounds]: Param 'move_group.default_workspace_bounds' was not set. Using default value: 10.000000
[move_group-1] [INFO] [1707832877.323354625] [moveit_ros.fix_start_state_bounds]: Param 'move_group.start_state_max_bounds_error' was set to 0.100000
[move_group-1] [INFO] [1707832877.323358817] [moveit_ros.fix_start_state_bounds]: Param 'move_group.start_state_max_dt' was not set. Using default value: 0.500000
[move_group-1] [INFO] [1707832877.323368781] [moveit_ros.fix_start_state_collision]: Param 'move_group.start_state_max_dt' was not set. Using default value: 0.500000
[move_group-1] [INFO] [1707832877.323373932] [moveit_ros.fix_start_state_collision]: Param 'move_group.jiggle_fraction' was not set. Using default value: 0.020000
[move_group-1] [INFO] [1707832877.323378058] [moveit_ros.fix_start_state_collision]: Param 'move_group.max_sampling_attempts' was not set. Using default value: 100
[move_group-1] [INFO] [1707832877.323388976] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Add Time Optimal Parameterization'
[move_group-1] [INFO] [1707832877.323393415] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Workspace Bounds'
[move_group-1] [INFO] [1707832877.323396200] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Start State Bounds'
[move_group-1] [INFO] [1707832877.323398922] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Start State In Collision'
[move_group-1] [INFO] [1707832877.323435071] [moveit.ros_planning.planning_pipeline]: Using planning request adapter 'Fix Start State Path Constraints'
[move_group-1] [INFO] [1707832877.334967510] [moveit.plugins.moveit_simple_controller_manager]: Added FollowJointTrajectory controller for scaled_joint_trajectory_controller
[move_group-1] [INFO] [1707832877.335867229] [moveit.plugins.moveit_simple_controller_manager]: Added FollowJointTrajectory controller for joint_trajectory_controller
[move_group-1] [INFO] [1707832877.335963552] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1707832877.335980187] [moveit.plugins.moveit_simple_controller_manager]: Returned 2 controllers in list
[move_group-1] [INFO] [1707832877.336158459] [moveit_ros.trajectory_execution_manager]: Trajectory execution is not managing controllers
[move_group-1] [INFO] [1707832877.336169094] [move_group.move_group]: MoveGroup debug mode is ON
[servo_node_main-3] #12 Source "../csu/libc-start.c", line 392, in __libc_start_main_impl [0x7f335ea29e3f]
[servo_node_main-3] #11 Source "../sysdeps/nptl/libc_start_call_main.h", line 58, in __libc_start_call_main [0x7f335ea29d8f]
[servo_node_main-3] #10 Object "/opt/ros/humble/lib/moveit_servo/servo_node_main", at 0x555799a99b36, in
[servo_node_main-3] #9 Object "/opt/ros/humble/lib/libservo_node.so", at 0x7f335f5f9699, in moveit_servo::ServoNode::ServoNode(rclcpp::NodeOptions const&)
[move_group-1] [INFO] [1707832877.345902073] [move_group.move_group]:
[move_group-1]
[move_group-1] ********************************************************
[move_group-1] * MoveGroup using:
[move_group-1] * - ApplyPlanningSceneService
[move_group-1] * - ClearOctomapService
[move_group-1] * - CartesianPathService
[move_group-1] * - ExecuteTrajectoryAction
[move_group-1] * - GetPlanningSceneService
[move_group-1] * - KinematicsService
[move_group-1] * - MoveAction
[move_group-1] * - MotionPlanService
[move_group-1] * - QueryPlannersService
[move_group-1] * - StateValidationService
[move_group-1] ********************************************************
[move_group-1]
[move_group-1] [INFO] [1707832877.345927063] [moveit_move_group_capabilities_base.move_group_context]: MoveGroup context using planning plugin ompl_interface/OMPLPlanner
[move_group-1] [INFO] [1707832877.345932036] [moveit_move_group_capabilities_base.move_group_context]: MoveGroup context initialization complete
[move_group-1] Loading 'move_group/ApplyPlanningSceneService'...
[move_group-1] Loading 'move_group/ClearOctomapService'...
[move_group-1] Loading 'move_group/MoveGroupCartesianPathService'...
[move_group-1] Loading 'move_group/MoveGroupExecuteTrajectoryAction'...
[move_group-1] Loading 'move_group/MoveGroupGetPlanningSceneService'...
[move_group-1] Loading 'move_group/MoveGroupKinematicsService'...
[move_group-1] Loading 'move_group/MoveGroupMoveAction'...
[move_group-1] Loading 'move_group/MoveGroupPlanService'...
[move_group-1] Loading 'move_group/MoveGroupQueryPlannersService'...
[move_group-1] Loading 'move_group/MoveGroupStateValidationService'...
[move_group-1]
[move_group-1] You can start planning now!
[move_group-1]
[servo_node_main-3] #8 Object "/opt/ros/humble/lib/libmoveit_servo_lib.so.2.5.5", at 0x7f335f51fee4, in moveit_servo::Servo::Servo(std::shared_ptr<rclcpp::Node> const&, std::shared_ptr<moveit_servo::ServoParameters const> const&, std::shared_ptr<planning_scene_monitor::PlanningSceneMonitor> const&)
[servo_node_main-3] #7 Object "/opt/ros/humble/lib/libmoveit_servo_lib.so.2.5.5", at 0x7f335f506a8e, in
[servo_node_main-3] #6 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f335eeae4d7, in __cxa_throw
[servo_node_main-3] #5 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f335eeae276, in std::terminate()
[servo_node_main-3] #4 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f335eeae20b, in
[servo_node_main-3] #3 Object "/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.30", at 0x7f335eea2b9d, in
[servo_node_main-3] #2 Source "./stdlib/abort.c", line 79, in abort [0x7f335ea287f2]
[servo_node_main-3] #1 Source "../sysdeps/posix/raise.c", line 26, in raise [0x7f335ea42475]
[servo_node_main-3] #0 | Source "./nptl/pthread_kill.c", line 89, in __pthread_kill_internal
[servo_node_main-3] | Source "./nptl/pthread_kill.c", line 78, in __pthread_kill_implementation
[servo_node_main-3] Source "./nptl/pthread_kill.c", line 44, in __pthread_kill [0x7f335ea969fc]
[servo_node_main-3] Aborted (Signal sent by tkill() 23739 1000)
[rviz2-2] [INFO] [1707832877.522118852] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-2] [INFO] [1707832877.522195166] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-2] [INFO] [1707832877.535141598] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-2] Warning: class_loader.impl: SEVERE WARNING!!! A namespace collision has occurred with plugin factory for class rviz_default_plugins::displays::InteractiveMarkerDisplay. New factory will OVERWRITE existing one. This situation occurs when libraries containing plugins are directly linked against an executable (the one running right now generating this message). Please separate plugins out into their own library or just don't link against the library and use either class_loader::ClassLoader/MultiLibraryClassLoader to open.
[rviz2-2] at line 253 in /opt/ros/humble/include/class_loader/class_loader/class_loader_core.hpp
[ERROR] [servo_node_main-3]: process has died [pid 23739, exit code -6, cmd '/opt/ros/humble/lib/moveit_servo/servo_node_main --ros-args --params-file /tmp/launch_params_82_7r8fc --params-file /tmp/launch_params_qwt0tlys --params-file /tmp/launch_params_pwj8_axs'].
[rviz2-2] [ERROR] [1707832880.606814560] [moveit_ros_visualization.motion_planning_frame]: Action server: /recognize_objects not available
[rviz2-2] [INFO] [1707832880.619365933] [moveit_ros_visualization.motion_planning_frame]: MoveGroup namespace changed: / -> . Reloading params.
[rviz2-2] [INFO] [1707832880.678204846] [moveit_rdf_loader.rdf_loader]: Loaded robot model in 0.00241828 seconds
[rviz2-2] [INFO] [1707832880.678253582] [moveit_robot_model.robot_model]: Loading robot model 'ur'...
[rviz2-2] [INFO] [1707832880.678268612] [moveit_robot_model.robot_model]: No root/virtual joint specified in SRDF. Assuming fixed joint
[rviz2-2] [WARN] [1707832880.689172423] [moveit_ros.robot_model_loader]: No kinematics plugins defined. Fill and load kinematics.yaml!
[rviz2-2] [INFO] [1707832880.725716154] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Starting planning scene monitor
[rviz2-2] [INFO] [1707832880.726327696] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Listening to '/monitored_planning_scene'
[rviz2-2] [INFO] [1707832880.882740673] [interactive_marker_display_94670730909520]: Connected on namespace: /rviz_moveit_motion_planning_display/robot_interaction_interactive_marker_topic
[rviz2-2] [INFO] [1707832880.884494074] [moveit_ros_robot_interaction.robot_interaction]: No active joints or end effectors found for group 'ur_ur_manipulator'. Make sure that kinematics.yaml is loaded in this node's namespace.
[rviz2-2] [INFO] [1707832880.885150487] [moveit_ros_robot_interaction.robot_interaction]: No active joints or end effectors found for group 'ur_ur_manipulator'. Make sure that kinematics.yaml is loaded in this node's namespace.
[rviz2-2] [INFO] [1707832880.888198991] [moveit_ros_visualization.motion_planning_frame]: group ur_ur_manipulator
[rviz2-2] [INFO] [1707832880.888215519] [moveit_ros_visualization.motion_planning_frame]: Constructing new MoveGroup connection for group 'ur_ur_manipulator' in namespace ''
[rviz2-2] [INFO] [1707832880.893923512] [interactive_marker_display_94670730909520]: Sending request for interactive markers
[rviz2-2] [INFO] [1707832880.894890624] [move_group_interface]: Ready to take commands for planning group ur_ur_manipulator.
[rviz2-2] [INFO] [1707832880.895175331] [moveit_ros_visualization.motion_planning_frame]: group ur_ur_manipulator
[rviz2-2] [INFO] [1707832880.895190987] [moveit_ros_visualization.motion_planning_frame]: group ur_ur_manipulator
[rviz2-2] [INFO] [1707832880.927225976] [interactive_marker_display_94670730909520]: Service response received for initialization
I have to mount the UR5e on top of a mobile base, hence I need to change the link names.
Thanks!
This might not yet be fully supported with ur_moveit_config
. The problem seems to be that the srdf macro correctly handles the prefix, but other config files (in particular kinematics.yaml
) don't recognize this option and always assume the planning group to be called ur_manipulator
. I will take a look at what needs to be changed to fix this and try to come up with a fix.
Hey @RobertWilbrandt,
Now the package is working properly on real robot but not in Gazebo because of the world tag reference in Gazebo. Do you know any way out of this?
Thanks!
Are you talking about this world
reference? It does indeed seem like ur_simulation_gazebo
incorrectly specifies as tf_prefix
parameter in the urdf but passes a prefix
in the launch file. Can you verify if this is the problem you are seeing?
Yeah that was one of the problems. This same thing also occurs in the ur_moveit.launch.py file.
Regarding the world reference, if I remove the world link and make the mobile base link as the parent, the ur_moveit.launch.py terminal keeps throwing this error and I can't see the interactive marker -
[rviz2-2] [INFO] [1710538940.941615619] [interactive_marker_display_98530526167552]: Sending request for interactive markers
[rviz2-2] [INFO] [1710538940.989779617] [interactive_marker_display_98530526167552]: Service response received for initialization
[rviz2-2] [INFO] [1710538941.026142870] [interactive_marker_display_98530526167552]: Sending request for interactive markers
[rviz2-2] [INFO] [1710538941.075549261] [interactive_marker_display_98530526167552]: Service response received for initialization
The message only stops when I do Ctrl+C.
If I insert the world link, but keep the mobile base link as the parent, the interactive marker shows up, but it is very buggy. Screencast from 03-15-2024 10:37:46 PM.webm
I don't yet understand why you are not able to see the interactive marker. Does your SRDF group ur_manipulator
have the correct joints with prefixes in the chain
element?
For your second problem: Did you update your collision matrix using moveit setup assistant (either the GUI or ros2 run moveit_setup_assistant collisions_updater [...]
)? This is required if you add additional geometry and not doing so might result in this kind of error.
The srdf has the correct joints. The only difference I made between the screenshot and the video in the previous post is the addition of world link. One possible explanation I can think of is that since the world frame is absent and moveit rviz window has world as the global fixed frame (it crashes if I change the global fixed frame), it fails to display the interactive marker.
The second problem: I have updated the collision matrix from the setup assistant GUI. It shows the red warning if I try to collide the arm with the base (verifying the collision matrix setup). I have kept the default values for sampling density and min. collisions. Do I need to change anything there?
Using a link that does not exist as rviz fixed frame will definitely lead to problems. Does rviz give you any additional output when it crashes?
You should not have to change any settings in the collision updater. Is the behavior still the same after updating the srdf?
It gives this log when I change the fixed frame, Rviz freezes and then crashes in 5-10 seconds -
[rviz2-2] [INFO] [1711007735.350631896] [interactive_marker_display_99721940551904]: Target frame is now base_link
[ERROR] [rviz2-2]: process has died [pid 439854, exit code -11, cmd '/opt/ros/humble/lib/rviz2/rviz2 -d /home/rudresh/Downloads/relffok_mir_30.1/install/ur_moveit_config/share/ur_moveit_config/rviz/view_robot.rviz --ros-args -r __node:=rviz2_moveit --params-file /tmp/launch_params_8urzsb5j --params-file /tmp/launch_params_arzrorba --params-file /tmp/launch_params_iepfirjx --params-file /home/rudresh/Downloads/relffok_mir_30.1/install/ur_moveit_config/share/ur_moveit_config/config/kinematics.yaml --params-file /tmp/launch_params_q0jjgt0y'].
The behaviour is still the same. I had updated the collision matrix while setting up MoveIt itself. I retried it with a fresh setup assistant, but the same output.
At this point its getting kind of hard for me to follow - Can you verify that your other config files (joint_limits.yaml
, kinematics.yaml
) also reflect the prefix? From my understanding the tf chain is now world
-> [...] -> platform base_link
-> ur_base_link
-> [...] and your SRDF group contains the chain ur_base_link
to ur_tool0
. You updated the SRDF allowed collision matrix with moveit setup assistant. Is that correct?
Yes, I have added prefixes to the relevant files, such that now I am able to control the joint with the joint value pane of the motion planning panel -
The tf-chain is -
My srdf group contains the chain ur_base_link
to ur_tools0
I have updated my collision matrix with moveit setup assistant
You can also checkout the GitHub repo for clarifications.
Additionally, I also cloned the gazebo simulation repo and made the same changes, but the interactive marker is working fine there.
So I am really confused why the interactive marker isn't working with the mobile base.
Sorry for the late response. At this point i am no longer sure what else to try, seeing that the tf tree looks correct for you and the SRDF also works this probably has some reason outside of this driver. We'll try fixing the handling of tf prefixes in all driver components. Please let us know if you find out what the problem in your setup is.
Affected ROS2 Driver version(s)
2.4.2
Used ROS distribution.
Humble
Which combination of platform is the ROS driver running on.
Ubuntu Linux with standard kernel
How is the UR ROS2 Driver installed.
From binary packets
Which robot platform is the driver connected to.
UR E-series robot
Robot SW / URSim version(s)
5.12.0 / 5.12.2 / 5.14.6
How is the ROS driver used.
Through the robot teach pendant using External Control URCap
Issue details
Summary
How to add prefix to control the ur5e through MoveIt2
Issue details
I am assembling ur5e on a mobile base. So I need to change the prefixes in order to use it. I have added the tf_prefix in the robot driver launch file -
I am able to see the tf_prefix in the tf_tree But when I run the moveit launch file -
I get the following error -
How do I add the prefixes so that the moveit file runs smoothly. Also, I saw in the ur_control launch file that the joint names in the configuration also need to be updated. Which yaml file needs to be updated in this case? The ur_controllers file already uses a tf_prefix, how do I assign the tf_prefix there?
Steps to Reproduce
Expected Behavior
What did you expect and why?
Actual Behavior
What did you observe? If possible please attach relevant information.
Workaround Suggestion
If a workaround has been found, you are welcome to share it.
Relevant log output
Accept Public visibility