Inverse Kinematic solver with self-collision prevention

Hi, I am using C++ API to plan the robot motion.

I recorded 2 sets of position data, point A and point B, each has its own x, y, z, roll, pitch, yaw.

Now I want to move from A to B without XArm colliding the vision camera mounted as end effector.

I’ve set collision detection on and my EE dimensions as follows:

xArm->set_self_collision_detection(true);
xArm->set_collision_tool_model(22, 3, 250, 200, 160);

I calculated the joint angles of point B using the get_inverse_kinematics function.
I then called set_servo_angle(angles, m_CurrentJointSpeed, 0, 0, true) to move to point B.

However, the camera still collides with the robot. How do I prevent this during the motion planning stage?

Hi Gellert_Li,

You can use set_only_check_type=1 before the motion command.


Our firmware can only help check if a self-collision will occur, can not plan a path to avoid the self-collision, you need to do it yourself.

Best regards,
Minna