Skip to content
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

MoveItPy does not support use_sim_time:=True #2220

Closed
henningkayser opened this issue Jun 1, 2023 · 3 comments · Fixed by #2223
Closed

MoveItPy does not support use_sim_time:=True #2220

henningkayser opened this issue Jun 1, 2023 · 3 comments · Fixed by #2223
Assignees
Labels
bug Something isn't working

Comments

@henningkayser
Copy link
Member

henningkayser commented Jun 1, 2023

Description

When working around #2219 by merging use_sim_time:=True into the MoveIt config dictionary, I'm seeing mixed results:

  • use_sim_time is actually set to True 🎉
  • The moveit_py node is crashing due to an rclcpp::exceptions::InvalidParameterValueException

In particular it prints:

[motion_planning_python_api_tutorial.py-2] terminate called after throwing an instance of 'rclcpp::exceptions::InvalidParameterValueException'
[motion_planning_python_api_tutorial.py-2]   what():  parameter 'qos_overrides./clock.subscription.durability' could not be set:

A quick search brought me to this issue comment, pointing out that use_sim_time:=True will enable qos_override callbacks on the /clock topic. Question is, why does everything work with the C++ versions MoveGroup/MoveItCpp, and why do we run into this exception with moveit_py?
I have briefly skimmed the node initialization and didn't find any obvious issues.

For context, I've been working on a MoveIt+Gazebo setup and wanted to add a MoveItPy example.
Here are instructions for running different launch files in a docker compose container. You'll find that all service targets besides python_gazebo work, python_gazebo fails for the described reason.

Your environment

  • ROS Distro: Humble
  • OS Version: Ubuntu 22.04
  • jammy-humble binaries (main branch)

Steps to reproduce

Try passing use_sim_time:=True like this.

Expected behaviour

The launch file should work and allow using sim time with moveit_py.

Actual behaviour

The Exception is thrown, node dies.

@henningkayser henningkayser added the bug Something isn't working label Jun 1, 2023
@sea-bass
Copy link
Contributor

sea-bass commented Jun 2, 2023

Do things actually work with MoveItCpp? Like if we launch the MoveItCpp tutorial and similarly test with use_sim_time as in these 2 issues, are the errors the same or not?

And if they aren't, the only difference I see in the tutorial vs. MoveItPy is the addition of allow_undeclared_parameters(true) ... which I don't know if it will do much?

EDIT: I tested the MoveItCpp tutorial and it still works with use_sim_time: True and allow_undeclared_parameters...

@henningkayser
Copy link
Member Author

@sea-bass thanks for testing.. Yes, MoveGroup works and MoveItCpp should work as well since that's being used internally. The allow_undeclared_parameters(true) flag is also used by MoveGroup here, so that shouldn't be the issue.
My current guess is that MoveItPy is missing some ROS args for the global context (whatever that really means...)

@henningkayser
Copy link
Member Author

henningkayser commented Jun 2, 2023

ok, looks like rclcpp is really not happy when not being told about use_sim_time:=true. #2223 fixes moveit_py sim for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants