ros / roslisp_common

Clone of the old roslisp_common SVN repo from code.ros.org.
8 stars 14 forks source link

Add URDF support for multiple visual and collision elements of a link #57

Closed artnie closed 1 year ago

artnie commented 1 year ago

Links in URDF can have multiple visual and collision children (http://wiki.ros.org/urdf/XML/link). Parsing some URDF link with cl_urdf always took the first child.

This PR adds two fields to the cl-urdf:link class: visuals and collisions. It keeps the old fields untouched for backwards-compatibility. When an XML link is parsed, all node children are filtered for the :|visual|/:|collision| name, and set as a list to their respective slot in the cl-urdf:link instance.

Test this with a URDF from the parameter server:

(cl-urdf:parse-urdf
           (roslisp:get-param "robot_description"))
gaya- commented 1 year ago

Great!