Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link Visual and Collision are not exported to XML #80

Open
wants to merge 4 commits into
base: ros2
Choose a base branch
from

Conversation

AdrianZw
Copy link

I realized, that Visual and Collision are not exported to XML, if they are set via the Constructor.
There is also an open issue for it #42.
In addition, I realized that this issue was already fixed on the melodic-branch, see pull request #47.

Consequently, I cherry-pick the changes introduced with #47. In addition, I had to remove one test, since the Visual class does not have an attribute name anymore.

Closes: #42
Relates: #47

Copy link
Contributor

@clalancette clalancette left a comment

Choose a reason for hiding this comment

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

Can you please retarget these changes to the ros2 branch? That's where most of the development for ROS 2 happens. Once that is done, I'll do a more detailed review. Thanks!

k-okada and others added 2 commits July 11, 2023 14:44
* 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 <[email protected]>
Co-authored-by: Shane Loretz <[email protected]>
The Visual class does not have an attribute name anymore. Consequently,
we can not expect the test to work.
@AdrianZw AdrianZw changed the base branch from foxy-devel to ros2 July 11, 2023 12:45
@AdrianZw
Copy link
Author

Can you please retarget these changes to the ros2 branch? That's where most of the development for ROS 2 happens. Once that is done, I'll do a more detailed review. Thanks!

I did not find a way to change the branch from which the changes are pulled from. (Unless opening a new PR) Thus, I repurposed the foxy-devel branch. Might not be the cleanest way, to do it ...

src/urdf_parser_py/urdf.py Outdated Show resolved Hide resolved
The attributes 'visual' and 'collision' exist only for back-compability reasons
and shall only be used if there exists one and only one visual or collision element.
For links with multiple visual or collision elements the new method is added which
shall be used. This simplifies the usage of the API.
- In the previous version, collision and visual objects were
added twice. Tests were updated accordingly.
- Added tests to check if visual and collision objects can be removed.
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.

3 participants