rdiankov / openrave

Open Robotics Automation Virtual Environment: An environment for testing, developing, and deploying robotics motion planning algorithms.
http://www.openrave.org
Other
693 stars 343 forks source link

Draft: Add GetCylinder[xxx] to GeometryInfo Python binding and add Cone backward compatibility #1286

Closed superfashi closed 1 year ago

superfashi commented 1 year ago

This PR adds GetCylinderTopRadius and GetCylinderBottomRadius to GeometryInfo Python binding.

Also adds support to Cone (when top or bottom radius is 0)

rdiankov commented 1 year ago

There's a potential problem here (and with current production) of when user sets bottomRadius=0 because they want a cone. Due to back compat, our system will currently think that is a full cylinder. We should change the place where we store top and bottom radius to _vGeomData.z and _vGeomData.w respectively so that if both _vGeomData.z==0 && _vGeomData.w==0, we know it is a regular cylinder and should just use _vGeomData.x. Otherwise, we would use topRadius=_vGeomData.z and bottomRadius=_vGeomData.w

superfashi commented 1 year ago

There's a potential problem here (and with current production) of when user sets bottomRadius=0 because they want a cone. Due to back compat, our system will currently think that is a full cylinder.

We should change the place where we store top and bottom radius to _vGeomData.z and _vGeomData.w respectively so that if both _vGeomData.z==0 && _vGeomData.w==0, we know it is a regular cylinder and should just use _vGeomData.x. Otherwise, we would use topRadius=_vGeomData.z and bottomRadius=_vGeomData.w

Good idea, I’ll implement this.

superfashi commented 1 year ago

@rdiankov Added support for cone.

superfashi commented 1 year ago

Closed by #1288