PickNikRobotics / deep_grasp_demo

Deep learning for grasp detection within MoveIt.
https://picknik.ai/
102 stars 52 forks source link

Tutorial pointing to wrong packages to make the demo work in melodic #15

Open ghost opened 2 years ago

ghost commented 2 years ago

Hi, for a while now, I am trying to make the deep grasp demo work on melodic.

I saw from that the latest working code was on this branch : https://github.com/bostoncleek/deep_grasp_demo.git -b update_generators And https://github.com/bostoncleek/moveit_task_constructor.git -b pr-deep_grasp_stage from this post https://github.com/ros-planning/moveit_task_constructor/issues/281#issuecomment-1008365007

For the remaining code to make the demo work, it is still a mystery which one to use...

The branch https://github.com/tahsinkose/franka_ros.git -b simulation does not exist anymore but it is referenced in the tutorial And https://github.com/tahsinkose/franka_ros.git -b melodic-devel is almost the same as https://github.com/frankaemika/franka_ros/tree/melodic-devel -b melodic-devel But are missing some adjustments.

And https://github.com/ros-planning/panda_moveit_config.git -b melodic-devel Is a lot different than https://github.com/ros-planning/panda_moveit_config.git -b noetic-devel

The best results were with the melodic-devel branches. I modified panda_camera.urdf.xacro to use panda_arm.urdf.xacro instead of panda_arm_hand.urdf.xacro and I added ros_controller.launch and ros_controller.yaml generated from the setup assistant config tutorial. The rest of the files generated with the setup assistant were very different from the branch config, so I kept the melodic-branch ones.

With the modified branches of franka_ros and panda_moveit_config I am able to run the deep grasp demo dexnet in rviz but the robot is falling under gravity in gazebo. If I look in the noetic section of the moveit tutorials, there is a step to make the configuration work in gazebo, but the files seem already modified on the branches.

I ask for help. How to turn a deep_grasp_headache into a working deep_grasp_demo ? I understand that maintaining the tutorials is a work in progress, but I think it needs a little refresh for the beginners like me... Which branches to use ? What is the recipe? What do you recommand ?

qyp-robot commented 2 years ago

Hi! I didn't use the setup assistant to generate panda_moveit_config, use moveit_resources_panda_moveit_config, don't use panda_moveit+config, this will cause collision problems and make it impossible to plan. Someone mentioned this problem before, and I also modified it according to them. As for the problem that the robot under gazebo drops due to gravity, there are two solutions. One is to pause the physical simulation of gazebo and set the value of the pause parameter to false in the launch file; the other is to use the official The recommended PID parameters of the effort controller, I will put the specific parameters in the screenshot, I hope it can help you! @mathieugouletcrvi

qyp-robot commented 2 years ago

image

qyp-robot commented 2 years ago

If it is not detailed enough, I will continue to add tomorrow morning, now I have to go to rest, I hope you are well

ghost commented 2 years ago

Hi @qyp-robot I took these packages : https://github.com/bostoncleek/deep_grasp_demo.git -b update_generators https://github.com/bostoncleek/moveit_task_constructor.git -b pr-deep_grasp_stage And https://github.com/ros-planning/moveit_resources.git -b melodic-devel <==== https://github.com/frankaemika/franka_ros/tree/melodic-devel -b melodic-devel

I changed the call to panda_moveit_config to moveit_resources_panda_moveit_config in panda_world.launch but moveit_resources_panda_moveit_config package miss ros_controller.launch and ros_controller.yaml files needed by deep_grasp_demo/launch/pandaworld.launch. When I launch roslaunch deep_grasp_task gazebo_pick_place.launch, strangely it does not complain about it.

The initialization goes on, with this warning Unable to update multi-DOF joint 'virtual_joint': Failure to lookup transform between 'world' and 'panda_link0' with TF exception: "world" passed to lookupTransform argument target_frame does not exist.

Then the rviz window opens and there is a global status error : "Fixed Frame [panda_link0] does not exist". The robot is displayed in rviz. In gazebo, there is the cylinder, but the robot is not there. I see Models => panda in the model tree, but there is nothing under it.

The opening sequence is : roslaunch deep_grasp_task gazebo_pick_place.launch => "$(find deep_grasp_task)/launch/panda_world.launch" => { param name="robot_description" command="$(find xacro)/xacro '$(find deep_grasp_task)/urdf/robots/panda_camera.urdf.xacro'" => xacro:include filename="$(find franka_description)/robots/panda_arm.urdf.xacro" => And include file="$(find moveit_resources_panda_moveit_config)/launch/ros_controllers.launch" => missing And include file="$(find moveit_resources_panda_moveit_config)/launch/move_group.launch" } At this point I expected the rvis robot and the gazebo robot to be displayed and in the same position, is it supposed to be the case ?

In which file I should add the gains in the provided image ? Is it related to this https://ros-planning.github.io/moveit_tutorials/doc/gazebo_simulation/gazebo_simulation.html# ?

Thank you for your help.

qyp-robot commented 2 years ago

Hi! @mathieugouletcrvi I know what your problem is; first of all I got these packages: https://github.com/bostoncleek/deep_grasp_demo/tree/update_generators https://github.com/bostoncleek/moveit_task_constructor/tree/pr-deep_grasp_stage This is the latest updated package; at present, my test is working normally, but there are some small problems that need to be modified, most of which you can search for; for moveit_resources, yours: https://github.com/ros-planning /moveit_resources should be correct; I don't quite remember, but I didn't make a mistake in this place, proving he's not using other branches; but https://github.com/frankaemika/franka_ros/tree/melodic-devel , you may have to change the urdf in franka_descripton in this package, because by default it loads the official modified controller interface of panda instead of gazebo's default controller interface; of course, you can test it, if the trajectory of moveit If the data can be sent to him, the robot in the gazebo will move normally. I modified it and used the default gazebo interface. I will put the details in the picture. As for the rest of your questions, I think it is more troublesome; first, you have to find your loading path in the launch file, find the file according to the path, whether the robot_descripton node is started, and the same is true for robot_state_publisher; more troublesome is that you may have to configure it yourself Gazebo's controller, of course, the PID parameters are loaded to the controller on the gazebo side; the moveit side also needs to change the configuration file so that the controller names in gazebo and moveit can match; of course, the real-time state of gazebo robot is in moveit. For timely updates, pay attention to the mapping relationship of the robot joint space. For example, my robot namespace is panda, otherwise moveit will not be able to receive the joint data. I draw the controller I configured and put the parameters in the picture; I The code has not been sorted out yet; it may take a while; if you have any problems during the debugging process, you can contact me, I hope you go well!

qyp-robot commented 2 years ago

image image image