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

Bugfix in InteractiveMarkerViewer #560

Merged
merged 4 commits into from
Jan 13, 2020
Merged

Bugfix in InteractiveMarkerViewer #560

merged 4 commits into from
Jan 13, 2020

Conversation

aditya-vk
Copy link
Contributor

If the viewer has an underlying world, skeleton markers corresponding to skeletons in the world that have been removed continued to be visualized. When the world removes the skeleton, the SkeletonPtr is non-nullptr and therefore the control did not reach the line that erases the marker from the map. This PR reorganizes the code for correction.

Tested via herb3_demos scripts for addition, deletion and updates to skeletons.

@brianhou: As a side: I wonder if we should re-introduce the WorldInteractiveMarkerViewer, not in its previous state but just to reimplement the updateSkeletonMarkers() function to have fewer if conditions.


Before creating a pull request

  • Document new methods and classes
  • Format code with make format

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md
  • Add unit test(s) for this change

@aditya-vk aditya-vk added this to the Aikido 0.3.0 milestone Dec 30, 2019
@aditya-vk aditya-vk requested a review from brianhou December 30, 2019 20:33
@aditya-vk aditya-vk requested a review from gilwoolee as a code owner December 30, 2019 20:34
//==============================================================================
void InteractiveMarkerViewer::updateFrameMarkers()
{
for (const FrameMarkerPtr& marker : mFrameMarkers)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (const FrameMarkerPtr& marker : mFrameMarkers)
for (const auto& marker : mFrameMarkers)

src/rviz/InteractiveMarkerViewer.cpp Show resolved Hide resolved
@brianhou brianhou merged commit 06cf453 into master Jan 13, 2020
@brianhou brianhou deleted the viewer branch January 13, 2020 18:34
@egordon
Copy link
Contributor

egordon commented Jan 15, 2020

@brianhou @aditya-vk This introduces a warning (if statement ambiguity) that breaks all downstream Travis CI calls (that treat warnings as errors):

/root/workspace/src/aikido/src/rviz/InteractiveMarkerViewer.cpp: In member function 'void aikido::rviz::InteractiveMarkerViewer::updateSkeletonMarkers()':
/root/workspace/src/aikido/src/rviz/InteractiveMarkerViewer.cpp:81:30: error: suggest parentheses around '&&' within '||' [-Werror=parentheses]
     if (!it->first || mWorld && !mWorld->hasSkeleton(it->first))
                       ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

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