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

Redundant visuals in KinematicElement #662

Open
christian-rauch opened this issue Sep 4, 2019 · 3 comments
Open

Redundant visuals in KinematicElement #662

christian-rauch opened this issue Sep 4, 2019 · 3 comments

Comments

@christian-rauch
Copy link
Collaborator

The KinematicElement stores visuals in two ways.

It (1) stores a path to the resource and a shape pointer directly as members:

shapes::ShapeConstPtr shape = nullptr;
std::string shape_resource_path = "";

but is (2) also stores an array of VisualElement:
std::vector<VisualElement> visual;

This appears to be redundant and confusing because it is not documented, if they are used in different ways. Can the members (shape and shape_resource_path) be removed?

In my scenario, the members are empty and the VisualElement actually contains the mesh reference.

@wxmerkt
Copy link
Collaborator

wxmerkt commented Sep 5, 2019

These are from different times and serve different purpose:

  • The shape is the traditionally loaded collision shape, which gets used in the CollisionScene
  • The shape_resource_path is used when a mesh is loaded via AddEnvironmentElement and needs to be used published on the CollisionShapes topic because it is not part of the robot kinematics
  • The VisualElement is for the new visualiser, i.e., MeshCat

I agree documentation and some clean-up once the new visualisers are ready is in order.

@christian-rauch
Copy link
Collaborator Author

I see that shape_resource_path is used for the visualization_msgs/Marker. Is the shape then only set, when a collision scene if created?

@wxmerkt
Copy link
Collaborator

wxmerkt commented Sep 5, 2019

From what I recall, yes. The shape is technically the collision shape.

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

No branches or pull requests

2 participants