-
Notifications
You must be signed in to change notification settings - Fork 557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
moveit2 + Gazebo simulation not working: Robot state (joint_states) not received #1480
Comments
Hello @MikelBueno thank you for reporting your issue. It seems like times are mismatching between Simulator and MoveIt, can you try setting up use_sim_time parameter to True for MoveIt? If you can push a reproducible example and instructions to run it somewhere public I would love to try to reproduce and help you debg in more detail. |
Hi @vatanaksoytezer, it worked, thank you very much! With regard to the source code, in https://github.com/IFRA-Cranfield/ros2_RobotSimulation you can find Gazebo + MoveIt!2 simulation packages for ROS2 Foxy, and probably in a few weeks' time I will create a new branch and upload the packages for ROS2 Rolling. Thanks again :) |
🥳 Glad it worked, and thank you for making it open source! I'm going to close the issue since it seems resolved but please feel free to continue the conversation or open a new issue if you face hardships. Thank you! |
Hi @MikelBueno, can you post how you used "use_sim_time" parameter for Moveit, I can't seem to find it. |
Yes please, can somewhen tel how to set this use_sim_time in Humble Moveit please? Having the same exact issue |
Hi @TheConstructAi and @patilyashr (I apologise for the late reply): This is how I have managed to set the use_sim_time in my .launch.py file in ROS2 Humble:
Thanks to those extra lines, I am now able to jog the robot in Gazebo using MoveIt!2+RVIZ. Hope this works. Best regards, |
Hi @MikelBueno It's happening only when gazebo is up, if I am trying it with only RVIZ on it's work. thank's, Omer |
Hi @omermaayani, Thanks for reporting this issue. It seems that I am not the only one having this issue. Something similar happens to me when I try to execute ROS2 Actions/Services that trigger movegroup() executions externally (from Python/C++ scripts). Robot manipulation through RVIZ works fine but, when I try to move the robot using MoveGroup Interface from a C++ script, I receive the same exact message as the one you have shared above. I believe it is an issue related to the system clock, and unfortunately, I have no idea about how it can be solved. @vatanaksoytezer any idea about why this is happening? Thanks in advance. Best regards, |
Hi, @MikelBueno I am facing the problem of being able to plan but not execute the movements with ROS2 humble ur_moveit_config setup. I didn't understand if I am I supposed to set Thanks! |
Hi @ozangungortuhh, You should set the use_sim_time parameter to True in the .launch.py file where you are launching the move_group node, as I do here: #1480 (comment). What are you trying to achieve? In your case, if trying to manipulate a UR Robot in Gazebo, I believe it should be in the ur_moveit.launch.py file. I hope this answer helps, otherwise feel free to answer back :) Regards, |
You can also check the solution mentioned in the moveit/moveit2_tutorials#587. This worked for me. |
@MikelBueno @qboticslabs @vatanaksoytezer I encountered the same issue. Moveit2, Rviz, and Gazebo work fine together, but when I try to use a C++ file, it throws an error. Is there a solution for this problem? I would really appreciate any help. environment: ros2 humble, panda robot. ros2 launch moveit2_tutorials move_group_interface_tutorial.launch.py |
@omermaayani Has your issue been resolved? |
const moveit::core::JointModelGroup* joint_model_group = log: [move_group_interface_tutorial-1] [INFO] [1680775155.255027553] [moveit_ros.current_state_monitor]: Didn't receive robot state (joint angles) with recent timestamp within 1.000000 seconds. Requested time 1680775154.254896, but latest received state has time 454.390000. |
I have already resolved this problem, thank you everyone. by adding {"use_sim_time": True} from launch import LaunchDescription def generate_launch_description():
|
I didn't found solution. I'm working around it with xyz commands that does not need the previous arm's state |
I have already resolved this issue by adding {"use_sim_time": True} to move_group_interface_tutorial.launch.py. Thanks to @omermaayani for the suggestion. |
Description
I have developed ready-to-use Gazebo + MoveIt!2 simulation packages for ROS2 Foxy (which can be found here, and are public for everyone: https://github.com/IFRA-Cranfield/ros2_RobotSimulation), and I am now in the process of porting them to ROS2 Humble/Rolling. The reason behind this is that ros2_control and ros2_controllers change from Foxy to Humble/Rolling version, and I need a ROS2 machine able to control ABB Robots using MoveIt!2 in both Gazebo and Real World (using abb_ros2 driver, which only works in Humble/Rolling - PickNikRobotics/abb_ros2#24 -). Of course, I believe it is simpler to port a ROS2 Gazebo+MoveIt!2 simulation package from Foxy to Humble/Rolling rather than the abb_ros2 driver from Humble/Rolling to Foxy...
The Gazebo simulation works well in ROS2 Rolling, but the problem comes when launching the Gazebo simulation and the MoveIt!2 framework (in order to control a robot in Gazebo from MoveIt!2). Everything seems fine, the environment is perfectly loaded, but when I try to plan and execute a movement MoveIt!2 returns an error message: The ROBOT STATE (joint states) could not be received. I have checked the /joint_states topic, and joint_state_broadcaster publishes the joint values properly. Therefore, I believe it is an internal error in MoveIt!2, which disables the communication between the joint states in Gazebo and the MoveIt!2 robot state monitor.
I have been researching a bit, and I believe this problem could be related to this issue in the past: #1190
Your environment
Steps to reproduce
I have a Ubuntu 22.04 machine with ROS2.0 Rolling and the following packages installed:
I have encountered this problem when testing the ABB IRB120 robot Gazebo+MoveIt! simulation packages in ROS2 Rolling:
But when trying to make a simple movement from the MoveIt!2 interface (jogging the robot, and clicking Plan & Execute)...
Expected behaviour
MoveIt!2 should plan and execute the requested Robot trigger, and the robot should move accordingly in Gazebo.
Actual behaviour
MoveIt!2 interface freezes for about a second, then returns that the execution failed. The robot does not move.
Backtrace or Console output
Extra: LAUNCH FILE
The launch file I am using to launch the simulation is the following:
The text was updated successfully, but these errors were encountered: