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

How to use MoveIt2 without ros2_control

asked 2023-06-27 04:24:55 -0600

dhindhimathai gravatar image

Hi all! At our company we are trying to use MoveIt2 (MoveGroupInteface) to plan trajectories for our robots. As of now, we are not using ros2_control to communicate with the real hardware, and hence we don't use joint_state_broadcaster to publish joint states. Instead, we are publishing them from our own ros2 node. This seems to break fcl collision check and we often get messages like the following: Even though the srdf disables collisions between these links. This seems to happen only when a planning scene is published. Trying with several options, again, it seems that if the planning scene is published using a publisher of PlanningScene message to the /planning_scene topic, this error happens. Instead, if PlanningSceneInterface is used with the method addCollisionObjects, the planning is successful.

In general, the documentation or the tutorials explain only the case in which ros2_control is used to publish joint states. We seem to have understood that this problem has something to do with getting properly the state of the robot. However, it is not entirely clear and we believe it would be interesting to understand how to keep MoveIt2 planning independent from ros2_control while publishing joint states on our own. What are the specifications that such a joint state publisher should meet in order to work with MoveIt2?

Our environment

Steps to reproduce

To reproduce the issue, we have prepared a working demo.

  • Clone the repo and open in container.
  • In a terminal, run ros2 launch moveit_debug demo.launch.py
  • Then, in a separate terminal ros2 launch moveit_debug collision.launch.py

Lines 100 or 101 of src/moveit_collision.cpp can be commented to try publishing planning scene through a classic publisher or PlanningSceneInterface.

Expected behaviour

The planning produced valid trajectories and are "executed" in RViz.

Actual behaviour

When publishing using a publisher to the /planning_scene topic, unexpected collisions are found. This is not the case when using planning_scene_interface.addCollisionObjects(collision_objects);.

We believe this is quite a common and important issue, which is not receiving the deserved interest from the community.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
-2

answered 2023-06-27 06:13:54 -0600

gregbowers gravatar image

Hello

The issue you described may be related to how MoveIt2 obtains and maintains the state of the robot. When using your own joint state publisher, there are certain specifications it should meet in order to work effectively with MoveIt2. It's important to ensure that the joint states are published accurately and consistently, reflecting the actual state of the robot. Additionally, you may need to synchronize the timing of the joint state publication with other components of MoveIt2, such as the collision checking algorithm. Further investigation and experimentation may be required to understand and address the specific problem you are encountering.

edit flag offensive delete link more

Comments

1

This answer seems to be generated by a Large Language Model... -_- If not, could you please provide more specific explanation and details?

dhindhimathai gravatar image dhindhimathai  ( 2023-06-27 08:44:57 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2023-06-27 04:24:55 -0600

Seen: 736 times

Last updated: Jun 27 '23