Answered on : 2024-06-28
To change the MoveIt goal state through code, you can follow these steps:
1. Utilize the MoveGroup class: The primary user interface in MoveIt is through the MoveGroup class. This class allows you to interact with the robot's planning group and set goals for motion planning [3].
2. Set a sequence of goals: You can use the Python API to communicate with MoveIt and set a sequence of goals for a manipulator robot. This enables you to define multiple goals for the robot to achieve in a specific order [4].
3. Adjust goal tolerances: When assigning a goal with a move_group interface configured with a non-zero goal_time_tolerance, ensure that the goal tolerances are appropriately set. This can impact the planning and execution of the robot's movements [5].
4. Debugging: If you encounter issues such as the joint trajectory controller failing with an "INVALID_GOAL" error, it might be due to incorrect goal settings or invalid states. Debugging these errors can involve checking the console output and verifying the goal representations [2].
By following these guidelines and utilizing the MoveIt tools effectively, you can successfully change the goal state of a robot through code.