0
$\begingroup$

Rosanswers logo

Hi, I was wondering if there is a way to check if a goal pose of a planned path (planned in moveit with OMPL) is a valid pose, meaning that joint position constraints, collision, etc. are taken into consideration. A Python function like

bool check_if_pose_if_valid(joint_position)

would be great.

Thanks for your answers


Originally posted by nmelchert on ROS Answers with karma: 143 on 2018-09-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

The easiest way should be to use the StateValidationService of the move_group node, by calling the service /check_state_validity with this message. You will need the RobotState, which you can get from the /get_planning_scene service with this message.

In the definition of the StateValidationService, you also find a pretty good example of how to do the checks yourself, in case you want to avoid calling the service too often.


Originally posted by fvd with karma: 2180 on 2018-09-10

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by nmelchert on 2018-09-11:
Thanks a lot for you answer. I will try to test the ''/check_state_validity'' service and mark this question as answered if it works for me.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.