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

Moveit servo how to update the scene

asked 2023-05-28 06:07:23 -0500

torydebra gravatar image

Hi all,

I have an arm that has to track continuosly some given poses. What I usually did is to use a PID to generate Cartesian velocities from the target poses and then IK to command the robot joints.

I would like to do this with Moveit (ROS1 Noetic) to exploit its features (mainly obstacle avoidance). I managed to set up my robot from the moveit tutorials and I can use move_group to plan and execute a collision free trajectory.

Now I was trying to follow the moveit servo tutorial, in particular I saw the pose tracking example which seems the right one for my needs. But I have problems about something:

  1. In the servo tutorial, the move_group node is launched, as well the servo_server. Why are they both necessary? Do not they command the same ros_controllers?

  2. I cannot update the arm status within the pose tracking node. In particular, the arm is starting in a homing position, but this node sees all the joints positions to zero, even if the PlanningSceneMonitor is active. The node is subscribed correctly to the joint_states topic which is filled with the correct joint values.
    When I used the move_group node (without servo) the status was correctly syncronized. How the scene is kept updated in the move_group node?
    Nobody in both cases publishes on the planning_scene topic. Should I use this? I saw that move_group internally uses moveit_cpp. Should I use it in the pose_tracking node as well?

Thanks for any help :D

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-05-28 09:57:16 -0500

Mike Scheutzow gravatar image

updated 2023-05-28 10:04:29 -0500

Disclaimer: I haven't used moveit_server, but I read the links you provided.

Why are they both necessary? Do not they command the same ros_controllers?

moveit and move_group are modular pieces of software. If you are careful, you can use some functionality without using other functionality. The demo you link to is not using the trajectory-planning or trajectory-execution portions of move_group, but it is using the planning-scene feature for collision detection.

In this demo, it looks to me like it is some outside code's responsibility to populate the planning-scene with obstacles, and update the obstacles if they move around. You will need to figure out how that happens.

It is your code's responsibility to generate the next cartesian coordinate (target_pose) that servo needs as input.

I didn't look inside servo code, but I assume that it will frequently ask the planning-scene if the arm is in collision (or close to collision), and stop the motion if the answer is "yes". It's not clear how your code learns that the arm can't reach the target_pose you specified (maybe you can call some method of servo?) It is then up to your code to provide a different target_pose to servo. I see no code in this demo that does re-planning for you.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2023-05-28 06:07:23 -0500

Seen: 171 times

Last updated: May 28 '23