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 the visualization of boxes. #874

Merged
merged 2 commits into from
Jun 7, 2021

Conversation

S-Dafarra
Copy link
Contributor

This fixes a bug in the visualization of boxes introduced by #845

The reason why that change was added in the first place was because I tried to add a box in the visualizer. In particular, I used a code like

    iDynTree::Box box;

    box.setX(0.1);
    box.setY(0.2);
    box.setZ(1.0);
    addGeometryToSceneManager(&box, nullptr, pimpl->m_irrSmgr);

I was expecting a box much bigger on the Z axis, but it was not the case. Indeed, it turned out that the orientation of the box was variable. Finally, by checking with valgrind, I realized that link_H_geometry was read when adding the mesh to the visualizer, but it was never set. Adding the initialization of link_H_geometry solved the problem for valgrind and in the visualization.

S-Dafarra added 2 commits June 7, 2021 15:27
Set the initial value for the link transform in the SolidShapes.
@S-Dafarra S-Dafarra requested review from traversaro and lrapetti June 7, 2021 13:36
@S-Dafarra
Copy link
Contributor Author

This problem was originally discovered by @lrapetti after using the Human URDF

@lrapetti
Copy link
Member

lrapetti commented Jun 7, 2021

Thanks for the fix.

Here it is the output of idyntree-model-view with the current master (with human-gazebo model)
master

Here it is after @S-Dafarra changes

sdafarra

@traversaro traversaro merged commit 7febf5a into robotology:master Jun 7, 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.

3 participants