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

LineShape for easily creating line visualizations #346

Closed
mxgrey opened this issue Mar 12, 2015 · 11 comments
Closed

LineShape for easily creating line visualizations #346

mxgrey opened this issue Mar 12, 2015 · 11 comments
Assignees
Milestone

Comments

@mxgrey
Copy link
Member

mxgrey commented Mar 12, 2015

I'd like to create a LineShape that allows users to put lines into the Frame/Entity kinematic tree and be visualized. I don't anticipate making lines compatible with dynamic collision checking or handling, because they are 1D shapes (so they are non-physical), but I think it would be fair to use them as visualization shapes.

@jslee02
Copy link
Member

jslee02 commented Mar 12, 2015

LineShape as visualization shape make sense but not as collision shape. First, it is not supported by collision checker. Although we can do collision check with LineShape, the dynamics can't be handled because of the zero momenta of inertia along the line's axis. For example, if we apply angular force along the axis of line then the acceleration would be infinite with the zero inertia. To support line dynamics model, new body node type would be required whose angular motion along the axis is ignored.

Anyways, LineShape as visualization shape sounds good. Please add error handling code for the case of attempting to add LineShape as collision shape.

@mxgrey
Copy link
Member Author

mxgrey commented Mar 12, 2015

Please add error handling code for the case of attempting to add LineShape as collision shape.

Should I just have it spit out a warning, or should I also refuse to allow LineShapes to be added as collision shapes?

@jslee02
Copy link
Member

jslee02 commented Mar 12, 2015

Ignoring the attempting to add with a warning would be good.

@jslee02
Copy link
Member

jslee02 commented Mar 12, 2015

I have a question. If it is able to collision check with LineShape then do you think it would be helpful for kinematics (or planning)? I have a plan to implement sensors for DART at some point. Then collision checking with ray should be implemented, and line can be supported easily.

@mxgrey
Copy link
Member Author

mxgrey commented Mar 12, 2015

That's a really good point. Line segment collision checking could be used to simulate proximity sensors, or to take point samples of objects to simulate LIDAR. I could easily imagine that being very useful.

Then if we're supporting collision detection with line segments, we might want to once again consider whether it makes any sense to allow lines to be added to BodyNodes as collision shapes. I'm still strongly inclined to say no, because 1D lines are still fundamentally non-physical, and there might end up being edge cases that are difficult to handle.

@mxgrey
Copy link
Member Author

mxgrey commented Mar 12, 2015

By the way, my plan was to implement line segments (I guess I should have been more clear about that). Do we also want to support infinite lines and rays as shapes?

@jslee02
Copy link
Member

jslee02 commented Mar 12, 2015

If FCL can support line segment, it would be best to make line segment to work with other collision shapes. I'll take a look at it if I can do.

@jslee02
Copy link
Member

jslee02 commented Mar 12, 2015

I think adding new shapes just for visualization is fine as long as we can draw it. So adding them sounds good to me.

@mxgrey
Copy link
Member Author

mxgrey commented Mar 12, 2015

Off the top of my head, I'm not sure how to draw infinite rays or infinite lines in OpenGL or in OSG, but I can certainly look into it.

@mxgrey
Copy link
Member Author

mxgrey commented Mar 13, 2015

I've implemented a LineSegmentShape, but I don't think the infinite ray/line is something that can be handled very gracefully by the visualizers. There's nothing built-in for OpenGL or OSG to support infinite geometries, so rendering them would involve inspecting the view and drawing line segments from one extreme of the view to the other. It could be done, but I suspect it might be more effort than it's worth.

@mxgrey
Copy link
Member Author

mxgrey commented Mar 19, 2015

Finished with #349

@mxgrey mxgrey closed this as completed Mar 19, 2015
@jslee02 jslee02 added this to the Release DART 5.0 milestone May 13, 2015
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