-
Notifications
You must be signed in to change notification settings - Fork 53
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
Add types for lidar visual #114
Conversation
@mihirk284 can you review the history of the commits? It looks like only the 2 or 3 last commits are not in master |
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
e1e1ae0
to
b0dd066
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing the visualization type in the example works for me! I left a few inline comments.
There are some coding style errors. You can find them doing running sh tools/code_check.sh
from the ign-rendering root dir.
Please also update changelog.
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed that in point visualization mode, a point is drawn in the center of the lidar visual. Do you see that?
Signed-off-by: Mihir Kulkarni <[email protected]>
I think that happened because of our initial assumption that the number of points remains the same for the visuals. In this case, I am updating the code to clear all visuals inside the Update() when the displayNonHitting value is set to true. This will remove the older points from memory instead of placing them at the centre of the visual. This change makes the Update() slightly slower than before. |
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
600560e
to
3296d4c
Compare
@@ -26,6 +26,8 @@ namespace ic = ignition::common; | |||
|
|||
/// \brief Run the demo and display Lidar Visual | |||
/// \param[in] _cameras Cameras in the scene |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Document arguments
Co-authored-by: Alejandro Hernández Cordero <[email protected]> Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
Signed-off-by: Mihir Kulkarni <[email protected]>
6630422
to
fa37115
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just need to fix windows build error. Otherwise, it's good to go.
#if (OGRE_VERSION <= ((1 << 16) | (10 << 8) | 7)) | ||
line->setMaterial("Lidar/LightBlueStrips"); | ||
#else | ||
mat = Ogre::MaterialManager::getSingleton().getByName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
windows CI caught a build error here. This needs to be:
Ogre::MaterialPtr mat =
Ogre::MaterialManager::getSingleton().getByName(
"Lidar/BlueRay");
#if (OGRE_VERSION <= ((1 << 16) | (10 << 8) | 7)) | ||
line->setMaterial("Lidar/TransBlack"); | ||
#else | ||
mat = Ogre::MaterialManager::getSingleton().getByName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same change is needed here. Need to declare mat
#if (OGRE_VERSION <= ((1 << 16) | (10 << 8) | 7)) | ||
line->setMaterial("Lidar/BlueStrips"); | ||
#else | ||
mat = Ogre::MaterialManager::getSingleton().getByName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
ogre/src/OgreLidarVisual.cc
Outdated
#if (OGRE_VERSION <= ((1 << 16) | (10 << 8) | 7)) | ||
line->setMaterial("Lidar/BlueRay"); | ||
#else | ||
mat = Ogre::MaterialManager::getSingleton().getByName( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@iche033 I think only this one needs the declaration. The others above are in the same namespace so the variable can be reused. I've pushed the edit for the same.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new build looks good!
Signed-off-by: Mihir Kulkarni <[email protected]>
Added points and lines to the lidar visual. Additional API to display only those points that are hitting is also added.
Please see issue ignitionrobotics/ign-rendering#84.