Skip to content

update backward compatibility on visual and collisions#47

Merged
clalancette merged 8 commits into
ros:melodic-develfrom
k-okada:melodic-devel
Mar 11, 2020
Merged

update backward compatibility on visual and collisions#47
clalancette merged 8 commits into
ros:melodic-develfrom
k-okada:melodic-devel

Conversation

@k-okada

@k-okada k-okada commented May 1, 2019

Copy link
Copy Markdown
Contributor

On indigo, to set visual and collisions on links, we write

        robot = urdf.Robot(name = 'test')
        link = urdf.Link(name = 'link',
                         visual = urdf.Visual(geometry = urdf.Cylinder(length = 1, radius = 1),
                                              material = urdf.Material(name = 'mat')))
        robot.add_link(link)

or

        robot = urdf.Robot(name = 'test')
        link = urdf.Link(name = 'link')
        link.visual = urdf.Visual(geometry = urdf.Cylinder(length = 1, radius = 1),
                                  material = urdf.Material(name = 'mat'))
        robot.add_link(link)

However, since melodic both method did not work well when we write URDF strings from these data as reported on #45. It only outputs <robot> and <link> tag without <visual> and <collision>.
And , to output <visual> and <collision> in URDF, we have to write

        robot = urdf.Robot(name = 'test')
        link = urdf.Link(name = 'link')
        link.add_aggregate('visual', urdf.Visual(geometry = urdf.Cylinder(length = 1, radius = 1),
                                                 material = urdf.Material(name = 'mat')))
        robot.add_link(link)

, but this is not work on Indigo machine.

This PR enable melodic users to continue using indigo-style code.

k-okada added 3 commits May 1, 2019 13:56
Link(visual=...) does not set <visual> on <link> since 0.4.0, breaks backward compatibility
@traversaro

Copy link
Copy Markdown
Contributor

Hi @clalancette @sloretz , let us know if there is anything we can do to help in merging this PR, thanks!

@clalancette clalancette left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks generally OK to me. @k-okada can you please rebase?

sloretz added 5 commits March 9, 2020 16:05
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
@sloretz
sloretz requested a review from clalancette March 9, 2020 23:26
@sloretz

sloretz commented Mar 9, 2020

Copy link
Copy Markdown
Contributor

This looks generally OK to me. @k-okada can you please rebase?

Brought up to date and made a few fixes for the version attribute.

@clalancette
clalancette merged commit 4378f06 into ros:melodic-devel Mar 11, 2020
AdrianZw pushed a commit to AdrianZw/urdf_parser_py that referenced this pull request Jul 11, 2023
* add test to build robot model from python urdf classes

* add more tests on python urdf build

* update backward compatibility

Link(visual=...) does not set <visual> on <link> since 0.4.0, breaks backward compatibility

* Robot accepts version kwarg

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Co-authored-by: Shane Loretz <sloretz@osrfoundation.org>
AdrianZw pushed a commit to AdrianZw/urdf_parser_py that referenced this pull request Jul 11, 2023
* add test to build robot model from python urdf classes

* add more tests on python urdf build

* update backward compatibility

Link(visual=...) does not set <visual> on <link> since 0.4.0, breaks backward compatibility

* Robot accepts version kwarg

Signed-off-by: Shane Loretz <sloretz@osrfoundation.org>
Co-authored-by: Shane Loretz <sloretz@osrfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants