ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Moveit trajectory execution doesn't work

asked 2023-06-29 06:01:25 -0500

Icon45 gravatar image

updated 2023-06-30 03:56:51 -0500

Hi everyone,

i created a moveit config for my ur10 with custom gripper. When i launch the demo.launch.py i can plan but not execute trajectories. When i hit execute i get the following in my terminal:

[rviz2-4] [INFO] [1688035966.649349884] [move_group_interface]: Execute request accepted
[move_group-3] [INFO] [1688035967.649866740] [moveit_ros.current_state_monitor]: Didn't received robot state (joint angles) with recent timestamp within 1.000000 seconds.
[move_group-3] Check clock synchronization if your are running ROS across multiple machines!
[move_group-3] [WARN] [1688035967.649984408] [moveit_ros.trajectory_execution_manager]: Failed to validate trajectory: couldn't receive full current joint state within 1s
[move_group-3] [INFO] [1688035967.650092339] [moveit_move_group_default_capabilities.execute_trajectory_action_capability]: Execution completed: ABORTED
[rviz2-4] [INFO] [1688035967.653340096] [move_group_interface]: Execute request aborted
[rviz2-4] [ERROR] [1688035967.748292166] [move_group_interface]: MoveGroupInterface::execute() failed or timeout reached
[rviz2-4] [WARN] [1688035968.393292976] [moveit_ros.planning_scene_monitor.planning_scene_monitor]: Maybe failed to update robot state, time diff: 1688035946.111s

Please note that this is not the full terminal printout while running the launch file.(if needed i'd be happy to share the rest)

Help would really be appreciated, because im stuck on that problem for quit a while now and don't know what to do.

EDIT: Here is the output from the log of my gazebo simlation:

ubuntu@ubuntu:~/Schreibtisch/ros2_ws$ ros2 launch ur10_assembly assembly_sim.launch.py 
[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2023-06-30-10-28-11-393100-ubuntu-8822
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [robot_state_publisher-1]: process started with pid [8831]
[INFO] [spawner-2]: process started with pid [8833]
[INFO] [spawner-3]: process started with pid [8835]
[INFO] [gzserver-4]: process started with pid [8837]
[INFO] [gzclient-5]: process started with pid [8850]
[INFO] [spawn_entity.py-6]: process started with pid [8852]
[robot_state_publisher-1] [INFO] [1688113693.140210522] [robot_state_publisher]: got segment base
[robot_state_publisher-1] [INFO] [1688113693.140367997] [robot_state_publisher]: got segment base_link
[robot_state_publisher-1] [INFO] [1688113693.140388396] [robot_state_publisher]: got segment base_link_inertia
[robot_state_publisher-1] [INFO] [1688113693.140399304] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-1] [INFO] [1688113693.140410778] [robot_state_publisher]: got segment camera_mount_link
[robot_state_publisher-1] [INFO] [1688113693.140420650] [robot_state_publisher]: got segment connector_link
[robot_state_publisher-1] [INFO] [1688113693.140430292] [robot_state_publisher]: got segment driver_link
[robot_state_publisher-1] [INFO] [1688113693.140439640] [robot_state_publisher]: got segment finger1_link
[robot_state_publisher-1] [INFO] [1688113693.140449041] [robot_state_publisher]: got segment finger2_link
[robot_state_publisher-1] [INFO] [1688113693.140458200] [robot_state_publisher]: got segment flange
[robot_state_publisher-1] [INFO] [1688113693.140467452] [robot_state_publisher]: got segment forearm_link
[robot_state_publisher-1] [INFO] [1688113693.140477837] [robot_state_publisher]: got segment ft_frame
[robot_state_publisher-1] [INFO] [1688113693.140487279] [robot_state_publisher]: got segment shoulder_link
[robot_state_publisher-1] [INFO] [1688113693.140497253] [robot_state_publisher]: got segment tool0
[robot_state_publisher-1] [INFO] [1688113693.140507406] [robot_state_publisher]: got segment upper_arm_link
[robot_state_publisher-1] [INFO] [1688113693.140516916] [robot_state_publisher]: got segment world
[robot_state_publisher-1] [INFO] [1688113693.140526629] [robot_state_publisher]: got segment wrist_1_link
[robot_state_publisher-1] [INFO] [1688113693.140536414] [robot_state_publisher]: got segment wrist_2_link
[robot_state_publisher-1] [INFO] [1688113693.140546708] [robot_state_publisher]: got segment wrist_3_link
[spawn_entity.py-6] [INFO] [1688113694.507214089] [spawn_ur]: Spawn Entity started
[spawn_entity.py-6] [INFO] [1688113694.507690379] [spawn_ur]: Loading entity published on topic robot_description
[spawn_entity.py-6] /opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/qos.py:307: UserWarning: DurabilityPolicy.RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL is deprecated. Use DurabilityPolicy.TRANSIENT_LOCAL instead.
[spawn_entity.py-6]   warnings.warn(
[spawn_entity.py-6] [INFO] [1688113694.510178106] [spawn_ur]: Waiting for entity xml on robot_description
[spawn_entity.py-6] [INFO] [1688113694.523542641] [spawn_ur]: Waiting for service /spawn_entity ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2023-06-29 10:47:51 -0500

sampreets3 gravatar image

updated 2023-06-29 10:48:04 -0500

There might be multiple reasons as to why your robot is not moving - it is difficult to say without having further context. But from previous experience with MoveIt2, I would suggest to check on your rqt_graph if you have someone publishing to the joint_states topic.

Something that might happen is that if you are in simulation, there could be a separate UR "emulator" program (Sorry I do not have any experience with URs), which sort of emulate the actual working of the robot controller. This controller typically publishes joint_state messages to the ROS layer, during normal operation. So, without having run this emulator first, it cannot have a feedback of the execute action. I mention this because I remember having this issue on the Doosan robot I worked on. For me, the fix was to start up the Doosan robot emulator, and I would see something being published on the /joint_states topic.

If you are testing directly on the real robot: Maybe check if you can indeed communicate between the robot controller and your computer - they might be on different networks.

Hope this helps.

edit flag offensive delete link more

Comments

Hi @sampreets3, first of all thank you for your answer. I'm running a simulation indeed and this simulation publishes joint states, so unfortunatly this doesn't seem to be the issue. The only thing that kind of concerns me is thet all the Nodes and topics launched by moveit seem not to be connected to the ones launched by my simulation.

Icon45 gravatar image Icon45  ( 2023-06-30 01:37:24 -0500 )edit

That might be an issue, as the move_group_interface node should be talking to /joint_states as far as I remember. Maybe you can step through your code and and find out why move_group_interface cannot see the rest of your systems - have you initialised everything properly? I would also encourage you to put up the full launch log file along with your rqt_graph so that we have a bit more context about what might be causing the issue. There could also be the possibility that something somewhere is dying abruptly, inspecting the logs would reveal that.

sampreets3 gravatar image sampreets3  ( 2023-06-30 02:55:29 -0500 )edit

@ sampreets3 So i've edited my question and provided the log files. The Rqt graph follows. Thanks for your help!

If you want to check out the code you can do so by checking out the Moveit Vizulisation Barnch in this repo https://github.com/Icon45/ROS2_Grasp.gitstrong text

Icon45 gravatar image Icon45  ( 2023-06-30 03:57:59 -0500 )edit

From what it looks like ( I am not a 100% sure), this might be a problem more on the ros2_controller side of things. If you see this particular line of your log file: Controller 'joint_state_broadcaster' can not be configured from 'active' state., it is saying that the gazebo_ros2_control plugin is not able to configure the joint_state_broadcaster controller. I would advise you to take a look at any files pertaining to ros2_control you might have changed that might cause such an error.

It would make sense that the /joint_states is not being published to since the joint_state_broadcaster is not being able to be configured properly. Maybe try reverting back to a configuration you know that works, and keep doing small increments from there on.

sampreets3 gravatar image sampreets3  ( 2023-06-30 09:07:30 -0500 )edit

Hi @sampreets, reverting back to a configuration that works would have been my first try also, but as this is the initial test after creating the moveit_configuration there is no such thing as a "working state".

If you want to have a look at the rqt graoh y can do so by checking the readmy of my repo: https://github.com/Icon45/ROS2_Grasp/...

Icon45 gravatar image Icon45  ( 2023-07-02 02:56:38 -0500 )edit

Hey @Icon45, I took a look at your rqt_graph, and it seems to me like there is some problem with your gazebo_ros2_control plugin. You should examine the configuration files to see if you find any fault there. You can refer to those set up by UR's official Github repo, I guess.

sampreets3 gravatar image sampreets3  ( 2023-07-03 03:13:46 -0500 )edit

Hi @sampreets, I checked the ros2-control configuration and it really was the issue. In my original urdf, from which I created the movie config pkg, was a ros2-control tag which messed things up a bit. I deleted it and generated a new movie configuration from the updated urdf. Now the Planning and execution in MoveIt works. My simulation still doesn’t pick up the movement from the moveit execution, but I thing that issue isn’t in the scope of this question anymore. Thank you very much for your time and help!

Icon45 gravatar image Icon45  ( 2023-07-04 09:06:41 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2023-06-29 06:01:25 -0500

Seen: 814 times

Last updated: Jun 30 '23