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

Check if target joint position is valid

asked 2018-09-10 07:55:00 -0600

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

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2018-09-10 19:47:34 -0600

fvd gravatar image

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.

edit flag offensive delete link more

Comments

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.

nmelchert gravatar image nmelchert  ( 2018-09-11 03:26:12 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2018-09-10 07:55:00 -0600

Seen: 1,148 times

Last updated: Sep 10 '18