When Franka Emika Panda's robotic arm plans a path, the claws in rviz show a collision

[ Franka Emika Panda connects to the real robotic arm (2) ]
This article is a supplement to the above.
The franka_ros function package and the panda_moveit_config function package in the previous article are compiled in different workspaces, so in the process of controlling the real robot arm, you have to follow the description in [Franka Emika Panda Connecting the Real Robot Arm (2)]. , start different control nodes successively. run

roslaunch panda_moveit_config panda_control_moveit_rviz.launch robot_ip:=172.16.0.2 load_gripper:=true

According to common sense, it should be possible to directly control the robotic arm, but the reality is that an error is reported, and the franka_control package cannot be found in reality. Later, by consulting the official documents, I found that the franka_ros function package and the panda_moveit_config function package were originally together. Later, the panda_moveit_config function package was taken out separately and placed under the ros_planning path.
So quickly put the franka_ros function package and the panda_moveit_config function package in a workspace to compile, there is no problem, running panda_control_moveit_rviz.launch also shows rviz, but it shows the collision between the claw and the end.
After reading the urdf file carefully
, the melodic versions of hand.urdf.xacro and panda_arm.urdf.xacro under franka_ros/franka_description/robots/ have changed.
insert image description hereThe reason for the collision here is that there is more of this sentence safety_distance=“0.03”. But this sentence cannot be removed now.
Solution:

cd ~/catkin_franka/src/panda_moveit_config/config
gedit panda_arm.xacro

Two more sentences were added at the end of the document. disable_collisions is set to not detect collisions between these two joints.

 <disable_collisions link1="panda_link0" link2="panda_link1" reason="Adjacent" />
    <disable_collisions link1="panda_link0" link2="panda_link2" reason="Never" />
    <disable_collisions link1="panda_link0" link2="panda_link3" reason="Never" />
    <disable_collisions link1="panda_link0" link2="panda_link4" reason="Never" />
    <disable_collisions link1="panda_link1" link2="panda_link2" reason="Adjacent" />
    <disable_collisions link1="panda_link1" link2="panda_link3" reason="Default" />
    <disable_collisions link1="panda_link1" link2="panda_link4" reason="Never" />
    <disable_collisions link1="panda_link2" link2="panda_link3" reason="Adjacent" />
    <disable_collisions link1="panda_link2" link2="panda_link4" reason="Never" />
    <disable_collisions link1="panda_link3" link2="panda_link4" reason="Adjacent" />
    <disable_collisions link1="panda_link3" link2="panda_link6" reason="Never" />
    <disable_collisions link1="panda_link4" link2="panda_link5" reason="Adjacent" />
    <disable_collisions link1="panda_link4" link2="panda_link6" reason="Never" />
    <disable_collisions link1="panda_link4" link2="panda_link7" reason="Never" />
    <disable_collisions link1="panda_link4" link2="panda_link8" reason="Never" />
    <disable_collisions link1="panda_link5" link2="panda_link6" reason="Adjacent" />
    <disable_collisions link1="panda_link6" link2="panda_link7" reason="Adjacent" />
    <disable_collisions link1="panda_link6" link2="panda_link8" reason="Default" />
    <disable_collisions link1="panda_link7" link2="panda_link8" reason="Adjacent" />

This is done, you can directly run a launch file to control the panda robotic arm.

Guess you like

Origin blog.csdn.net/qq_34935373/article/details/122245330