gtrll / piper

Other
62 stars 22 forks source link

Sphere placement #4

Closed lounick closed 6 years ago

lounick commented 6 years ago

Hi,

I'm trying to integrate the GPMP2 with a Tiago robot, but I seem to have a problem understanding on how to place the spheres for collision checking.

The documentation mentions that they are attached relative to the joint. I was under the impression that a kinematic chain using DH parameters is attaching a coordinate frame to the links connecting to joints. So I'm a bit confused with this.

I tried visualising the spheres generated for the PR2 example with RViz but they seemed off. I can post the code used for the visualisation and maybe we can have it as a feature of piper.

Thanks in advance. Any help will be highly appreciated.

Cheers, Niko

mhmukadam commented 6 years ago

Hi, the convention used to represent the robot inside GPMP2 is different than the one used in rviz. That is why the PR2 spheres look off. If you visualize your spheres in matlab using GPMP2 function 'gpmp2/matlab/+gpmp2/plotRobotModel.m' they will appear correctly (we have also recently tried the ros toolbox in matlab that nicely visualizes the robot from a urdf, then you can work out sphere placements in there by visualizing the spheres with 'plotRobotModel' on top of it).

The sphere positions are defined relative to a joint's coordinate frame. For example, a simple two link planar arm: b ==== 0 ==== 1 (b - base/origin, 0 - joint 0, 1 - joint 1/end effector) all spheres here are defined wrt frames 0 and 1.

lounick commented 6 years ago

Hi thanks,

I'll try with the matlab approach as you suggested. I thought that it is different than RViz I just tried to find out what are the differences and transform the spheres accordingly but wasn't that successful. I'll report back.

Thank you again for your time! :smile: