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

Fix locale-dependent string-to-float conversion when loading Collada meshes #1684

Closed
wants to merge 2 commits into from

Conversation

peci1
Copy link
Contributor

@peci1 peci1 commented Nov 24, 2021

Description

Fixes #1665.

<unit meter=""> attribute of of Collada meshes was read in a locale-dependent manner. This PR fixes it.

Checklist

  • If you are addressing rendering issues, please provide:
  • If you are changing GUI, please include screenshots showing how things looked before and after.
  • Choose the proper target branch: latest release branch, for non-ABI-breaking changes, future release branch otherwise.
    Due to the lack of active maintainers, we cannot provide support for older release branches anymore.
  • Did you change how RViz works? Added new functionality? Do not forget to update the tutorials and/or documentation on the ROS wiki
  • While waiting for someone to review your request, please consider reviewing another open pull request to support the maintainers of RViz. Refer to the RViz Wiki for reviewing guidelines.

@simonschmeisser
Copy link
Contributor

I was also wondering if there is a function in assimp to get the scale/unit which might possible be not-broken? Then we could kill that Collada special casing and have scale support for any other file type that supports it as well (I'm sure there are some ...)

@rhaschke
Copy link
Contributor

The unit scale is actually read by assimp and applied. Not sure though, why the scaling isn't actually considered. I found the post-processing option aiProcess_GlobalScale which wasn't yet used by rviz. However, it doesn't change the result 😞

@rhaschke
Copy link
Contributor

Interestingly, I get these errors on your meshes, which is confusing as the XML is perfectly valid:
Collada: file:///tmp/meshes/cube.dae - Expected end of <author> element.

I'm using assimp 5.0.1~ds0-1build1 on Ubuntu 20.04. Which version do you use?

@peci1
Copy link
Contributor Author

peci1 commented Nov 26, 2021

I'm on 4.1.0~dfsg-3 (Melodic / 18.04)

@rhaschke
Copy link
Contributor

Closing in favor of #1685.

@rhaschke rhaschke closed this Nov 26, 2021
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.

Marker load mesh resource success, but not show in window?
3 participants