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

Migrate map display #267

Merged
merged 30 commits into from
Jun 15, 2018
Merged

Migrate map display #267

merged 30 commits into from
Jun 15, 2018

Conversation

Martin-Idel-SI
Copy link
Contributor

@Martin-Idel-SI Martin-Idel-SI commented May 17, 2018

Closes #99

This PR migrates the Map display to ROS2. The old map display could subscribe to OccupancyGridUpdate messages, too. This functionality has also been ported, but it is commented out due to the fact that the message types are not available in ROS2, yet. Once they become available, it should be easy to enable updating a map again.

Furthermore, this PR

  • adds a visual test for the map display
  • deletes several tests in the old rviz test folder that are now superseded by automated visual tests (including all python tests for maps). More tests can probably be deleted, but we have to have a look whether all functionality has been ported. This will be done in follow-up pull requests.
  • migrates (and refactors) the msg_conversions.hpp functions and uses them when possible.
  • refactors displays to avoid code duplication with alpha-blending and material creation, encapsulating this functionality into rviz_rendering.

@tfoote tfoote added the in review Waiting for review (Kanban column) label May 17, 2018
@Martin-Idel-SI
Copy link
Contributor Author

CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@wjwwood wjwwood added this to the bouncy milestone May 23, 2018
@Martin-Idel-SI
Copy link
Contributor Author

CI after rebase:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@wjwwood
Copy link
Member

wjwwood commented Jun 6, 2018

I added a pr to add map_msgs to our CI: ros2/ros2#500

@Martin-Idel-SI Martin-Idel-SI force-pushed the feature/migrate_map_display branch 2 times, most recently from 09890ab to bfa76f5 Compare June 6, 2018 12:35
@Martin-Idel-SI
Copy link
Contributor Author

Martin-Idel-SI commented Jun 6, 2018

Then let's see, whether this works (we tested locally that it actually works, this is just CI):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Sadly, there is still an error on the map_msgs branch regarding the service files.

@wjwwood
Copy link
Member

wjwwood commented Jun 13, 2018

@wjwwood to look into the issue with the service definitions in map_msgs.

@mikaelarguedas
Copy link
Member

From a quick look it seems that the parser requires the --- to separate the request and response field even if there's no response field.
The easy fix is to just add the --- separator after the request field for all srv files that don't have it

@anhosi anhosi force-pushed the feature/migrate_map_display branch from ae01f11 to 49d89d9 Compare June 13, 2018 12:35
@anhosi
Copy link
Contributor

anhosi commented Jun 13, 2018

@wjwwood I rebased this branch but will not start a new CI as it cannot succeed due to the map_msgs.

@mikaelarguedas
Copy link
Member

@anhosi You can use https://github.com/mikaelarguedas/navigation_msgs branch ros2_srv_missing_separator for testing in the meantime

@anhosi
Copy link
Contributor

anhosi commented Jun 13, 2018

New CI (restricted to rviz) including map_msgs (thanks @mikaelarguedas):

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@wjwwood wjwwood added in progress Actively being worked on (Kanban column) and removed in review Waiting for review (Kanban column) labels Jun 14, 2018
@wjwwood
Copy link
Member

wjwwood commented Jun 14, 2018

I'm gonna place this in progress until CI is fixed up.

@wjwwood
Copy link
Member

wjwwood commented Jun 14, 2018

@wjwwood reminder to self merge ros2/ros2#500 with this.

@mikaelarguedas
Copy link
Member

Headsup: ros-planning/navigation_msgs#5 has been merged and the branch deleted so next round of CI should use the ros2 branch of https://github.com/ros-planning/navigation_msgs

@Martin-Idel-SI
Copy link
Contributor Author

Martin-Idel-SI commented Jun 14, 2018

Then let's give it a try with the new CI:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

@wjwwood We added the last commit (91d49ce) only the make the tests pass. This commit resolves an undetected merge error from last night and will be published as a pr of its own. The last commit will cause a conflict once the other pr is merged. Simply remove the last commit from this pr before merging will work

@Martin-Idel-SI
Copy link
Contributor Author

Martin-Idel-SI commented Jun 14, 2018

Next try with OSX:

  • macOS Build Status

@wjwwood wjwwood removed their assignment Jun 14, 2018
@wjwwood wjwwood added in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Jun 15, 2018
@wjwwood
Copy link
Member

wjwwood commented Jun 15, 2018

I resolved the conflict, running CI again on Linux as a tripwire for issues with the conflict resolution:

Build Status

@Martin-Idel-SI Please review my merge commit e6f038a to make sure I didn't screw anything up logically.

Copy link
Member

@wjwwood wjwwood left a comment

Choose a reason for hiding this comment

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

A few small style comments, but those aren't blocking the merge.

class Swatch
{
public:
RVIZ_DEFAULT_PLUGINS_PUBLIC Swatch(
Copy link
Member

Choose a reason for hiding this comment

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

nitpick: macro and class name should be on two separate lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll fix that together with #297 .

return palette_builder->setColorForIllegalPositiveValues(0, 255, 0)
->setRedYellowColorsForIllegalNegativeValues()
->setColorForLegalNegativeValueMinusOne(0x70, 0x89, 0x86)
->buildPalette();
Copy link
Member

Choose a reason for hiding this comment

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

This indentation is strange to me. I would have expected it to either be aligned with the -> on the first line or only have one extra indention (two spaces) from the return.

I guess this is what uncrustify did?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I would have preferred the alignment with ->, but it wouldn't let me do it.

@wjwwood wjwwood merged commit b87ace6 into ros2:ros2 Jun 15, 2018
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Jun 15, 2018
@Martin-Idel-SI
Copy link
Contributor Author

@wjwwood Looks good. Map works as expected. Visual test runs, all other tests run, too.

@Martin-Idel-SI Martin-Idel-SI deleted the feature/migrate_map_display branch June 15, 2018 12:33
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.

6 participants