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

Move codes in euscollada-robot.l to irteus #41

Open
snozawa opened this issue May 24, 2014 · 7 comments
Open

Move codes in euscollada-robot.l to irteus #41

snozawa opened this issue May 24, 2014 · 7 comments

Comments

@snozawa
Copy link
Contributor

snozawa commented May 24, 2014

I'd like to move codes in euscollada-robot.l to irteus discussed in[1].
[1] #18

I already moved sensor accessor [2, 3].
[2] euslisp/jskeus#92
[3] #40

@YoheiKakiuchi
Can we move collada-body definition to irteus/xxx.l?
https://github.com/jsk-ros-pkg/jsk_model_tools/blob/master/euscollada/src/euscollada-robot.l#L58

snozawa pushed a commit to snozawa/jskeus that referenced this issue May 24, 2014
@YoheiKakiuchi
Copy link
Member

Moving collada-body to irteus is good.
Is it better to change name of 'collada-body' ?
It is not depend on collada, just drawing glvertices loaded from mesh file.

@snozawa
Copy link
Contributor Author

snozawa commented May 24, 2014

What do you think about glvertices-body or body-with-glvertices?

snozawa pushed a commit to snozawa/jsk_model_tools that referenced this issue May 24, 2014
@k-okada
Copy link
Member

k-okada commented May 24, 2014

I'm not sure but I feel there are more better solution since 1) if there are class that inherit from body class, then it not works 2) you can check is we should draw using glvertices in draw-objects function

I'd like to check how glvertices and collada-body is used and find better integration of existing codes

  • Where do you uses collada-body
  • How do we set glvertices?
  • Does glvertices is only used in collada-body?

@snozawa
Copy link
Contributor Author

snozawa commented May 30, 2014

Thank you for your suggestion and

I'm not sure but I feel there are more better solution since

  1. if there are class that inherit from body class, then it not works 2) you can check is we should draw using glvertices in draw-objects function

this is quite important point.
One solution is to add glvertices to existing class's slots, e.g.,
faceset (body?) ot bodyset.

@YoheiKakiuchi

What do you think about to add glvertices to faceset (body) or bodyset?

I think bodyset class is originally defined because of the display problem.

  • Set different colors for (send xx :bodies)
  • Use specific GL drawing (defined in euslib/jsk/jskgl.l, but I don't know about this in detail...)
    ...etc

Hence, current specification seems:

  • body class : simple geometry class, which is single coloring.
  • bodyset : extended geometry class, which has special coloring and displaying manner.

If we add glvertices to bodyset, we do not need to change this specification.
glvertices is used as one of the special displaying manners.

YoheiKakiuchi added a commit to YoheiKakiuchi/jsk_pr2eus that referenced this issue Jun 1, 2014
@YoheiKakiuchi
Copy link
Member

From my understanding, bodyset is set(list) of body and reason for adding bodyset is not only coloring problem but I have no idea for that.

Bodyset is displayed not by its own method but by method which bodies(this is slot of bodyset) have.
So, I think it's better that geometry is in bodies at bodyset.

Where do you uses collada-body

collada-body is a body which has convex-hull geometry for collision check and is displayed with glvertices (it's loaded from mesh file).
Robot models which are generated by euscollada use collada-body.

How do we set glvertices?

glvertices is set in initializer.
There is no setter/getter method, it's better to add them.

Does glvertices is only used in collada-body?

No. glvertices is created for displaying mesh file read by eus-assimp.
update-to-original-meshfile for nao, pr2, (atlas) is using glvertices for displaying original mesh file.

@k-okada
Copy link
Member

k-okada commented Jun 2, 2014

I'm not confident but body class keeps the opengl pointer (opengl list) and that is generated when euslisp displays the body instance in the first time. I think glvertices seems very similar approach but not uses euslisp's edge-vector data structure in order to speed up. is it right?

If so, I think there is a way to integrate collada-body into original body class, for example when data is loaded from model file then it runs opengl code and generate opengl pointer and store them, as well as load convexl-hull model and store as edge-vartices. How do you think?

@YoheiKakiuchi
Copy link
Member

I'm not confident but body class keeps the opengl pointer (opengl list) and that is generated when euslisp displays the body instance in the first time. I think glvertices seems very similar approach but not uses euslisp's edge-vector data structure in order to speed up. is it right?

yes.

If so, I think there is a way to integrate collada-body into original body class, for example when data is loaded from model file then it runs opengl code and generate opengl pointer and store them, as well as load convexl-hull model and store as edge-vartices. How do you think?

It means body class doesn't have glvertices object and only using for generating gl pointer ?
If user would like to change display mode to transparent, body class should have glvertices object.
Then, glvertices object can stored property-list at body class as same as glvertices in rbrain.

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

3 participants