Skip to content

Migrate scalar displays#367

Merged
wjwwood merged 9 commits intoros2:ros2from
GW1708:migrate_scalar_displays
Jan 7, 2019
Merged

Migrate scalar displays#367
wjwwood merged 9 commits intoros2:ros2from
GW1708:migrate_scalar_displays

Conversation

@GW1708
Copy link
Copy Markdown
Contributor

@GW1708 GW1708 commented Dec 20, 2018

Closes #90 #89 #78 #77

This PR migrates temperature, illuminance, relative humidity and fluid pressure displays.
Since they work extremely similar they were refactored by introducing a point cloud scalar parent class

Refactored display page objects by moving set queue size to point cloud common page object and deleting unnecessary page objects.

CI:

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

Including Visual Tests:

  • Linux Build Status

@tfoote tfoote added the in review Waiting for review (Kanban column) label Dec 20, 2018
@GW1708
Copy link
Copy Markdown
Contributor Author

GW1708 commented Dec 20, 2018

CI was done by @Martin-Idel-SI
Visual tests on Linux seem to fail but are fine locally and on our Jenkins

Copy link
Copy Markdown
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.

lgtm, just with a few style nitpick's. I'll run CI and build/test locally asap.

src/rviz_default_plugins/view_controllers/ortho/fixed_orientation_ortho_view_controller.cpp
src/rviz_default_plugins/view_controllers/xy_orbit/xy_orbit_view_controller.cpp
)
test/rviz_default_plugins/publishers/fluid_pressure_publisher.hpp)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
test/rviz_default_plugins/publishers/fluid_pressure_publisher.hpp)
test/rviz_default_plugins/publishers/fluid_pressure_publisher.hpp
)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is this file added to the sources list? Shouldn't it instead be part of the test executable?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My bad, it should be part of the test executable of course. Fixed!

ament_add_gmock(point_cloud_scalar_display_test
test/rviz_default_plugins/displays/pointcloud/point_cloud_scalar_display_test.cpp
test/rviz_default_plugins/displays/display_test_fixture.cpp
${SKIP_DISPLAY_TESTS})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use 2 space indentations.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Here and below.

* \class FluidPressureDisplay
* \brief Displays an FluidPressure message of type sensor_msgs::FluidPressure
*
*/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be like this:

/// Display a FluidPressure message of type sensor_msgs::FluidPressure.
/**
 * \class FluidPressureDisplay
 */

Note: that the *'s align vertically, Display and not Displays, and a not an.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

These doc style changes should be applied to the rest of the doc blocks in the rest of this file.

/**
* \class FluidPressureDisplay
* \brief Displays an FluidPressure message of type sensor_msgs::FluidPressure
*
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
*

void updateQueueSize();
/**
* \class FluidPressureDisplay
* \brief Displays an FluidPressure message of type sensor_msgs::FluidPressure
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Move the brief above the /** block comment and use ///.

</class>

<class
name="rviz_default_plugins/RelativeHumidity"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

2 space indentation here too.

@GW1708
Copy link
Copy Markdown
Contributor Author

GW1708 commented Jan 7, 2019

Done! Fixed the remaining style errors and added a missing keyword to the visual testing framework README

@andreasholzner
Copy link
Copy Markdown

andreasholzner commented Jan 7, 2019

Just to be sure a new round of CI:

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

Visual tests: Build Status

Maximilian Kuehn and others added 9 commits January 7, 2019 16:04
…luid pressure) header and source file from rviz to rviz2
changed pointers to smart pointers
replaced outdated headers
updated CMakeList and plgins_description
They test if color changes correctly.
Refactored point cloud common page object by implementing the queuesize method. Therefore laser scan, point cloud and point cloud 2 page objects become redundant
Added the header file point cloud scalar that includes all functionality that was possible to template. This excludes the process message function and the set initial values und update properties function.
Furthermore the process message function was split up into several smaller functions where the createpointcloud2message function allows for unit tests because no instance of the actual point cloud is needed.
Test for correct memory allocation and correct copy of values.
Also uncrustified files with linter errors
updated ported displays.
Changed ament for colcon
Indentation, doc blocks
without it the tests do not execute
without it the tests do not run
@andreasholzner andreasholzner force-pushed the migrate_scalar_displays branch from 3c395bf to 54a2453 Compare January 7, 2019 15:04
@andreasholzner
Copy link
Copy Markdown

@wjwwood The unstable builds of the previous round of CI were all uncrustify errors that are already fixed by #366. So I rebased and started new CI build just to be sure (we no longer have our own CI infrastructure at TNG available). The Linux failure above was repeatedly caused by a docker connection error and is not related to the code problems.

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

@wjwwood
Copy link
Copy Markdown
Member

wjwwood commented Jan 7, 2019

Trying Linux again:

  • Build Status

@wjwwood wjwwood merged commit 9f3f3a6 into ros2:ros2 Jan 7, 2019
@wjwwood wjwwood removed the in review Waiting for review (Kanban column) label Jan 7, 2019
wjwwood added a commit that referenced this pull request Jan 14, 2019
wjwwood added a commit that referenced this pull request Jan 15, 2019
* Revert "Migrate scalar displays (#367)"

This reverts commit 9f3f3a6.

* Revert "Handle FindEigen3 module's differing definitions (#370)"

This reverts commit 2077b3a.

* Revert "Skip the system directories when looking for OGRE (#371)"

This reverts commit 61de77f.

* Revert "Revert "Visibility followup for marker" (#369)"

This reverts commit 712f903.
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.

4 participants