-
Notifications
You must be signed in to change notification settings - Fork 112
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
fuse -> ROS 2 fuse_loss: Port fuse_loss #287
Conversation
6498b04
to
3b56294
Compare
3b56294
to
9d0475b
Compare
9245bc0
to
2d3ac06
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.
Mind fixing this compiler warning?
In file included from /home/osrf/ws/rolling/src/fuse/fuse_loss/test/test_qwt_loss_plot.cpp:46:
/home/osrf/ws/rolling/src/fuse/fuse_loss/include/fuse_loss/qwt_loss_plot.h: In constructor ‘fuse_loss::QwtLossPlot::QwtLossPlot(const std::vector<double, std::allocator<double> >&, const fuse_loss::HSVColormap&)’:
/home/osrf/ws/rolling/src/fuse/fuse_loss/include/fuse_loss/qwt_loss_plot.h:221:35: warning: ‘static QVector<T> QVector<T>::fromStdVector(const std::vector<BufferT>&) [with T = double]’ is deprecated: Use QVector<T>(vector.begin(), vector.end()) instead. [-Wdeprecated-declarations]
221 | : residuals_(QVector<double>::fromStdVector(residuals))
colcon build --packages-select fuse_loss --cmake-args -DBUILD_WITH_PLOT_TESTS=ON -DBUILD_WITH_INTERACTIVE_TESTS=ON
fuse_loss/CMakeLists.txt
Outdated
) | ||
|
||
install( | ||
FILES fuse_plugins.xml | ||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | ||
DESTINATION share/${PROJECT_NAME} |
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.
Use pluginlib_export_plugin_description_file()
https://github.com/ros/pluginlib/blob/rolling/pluginlib/cmake/pluginlib_export_plugin_description_file.cmake - it will both do this install and setup the right stuff in the ament_index
for pluginlib to find the plugins.
fuse_loss/CMakeLists.txt
Outdated
|
||
add_library(${PROJECT_NAME} | ||
## fuse_loss library | ||
add_library(${PROJECT_NAME} SHARED |
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.
If you intentionally leave off SHARED
then this library can be built statically by setting -DBUILD_SHARED_LIBS=OFF
in CMake.
This is one of those weird CMake features/conventions, but It looks like it was being used here before since SHARED
wasn't specified. ament_cmake_ros
documents that option when it's find_package()'d
, so change find_package(ament_cmake REQUIRED)
to find_package(ament_cmake_ros REQUIRED)
above too.
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'll also remove the SHARED on fuse_core
in this PR too. It was added by me in a previous PR.
endif () | ||
include( FindPackageHandleStandardArgs ) | ||
if( CMAKE_VERSION LESS 2.8.3 ) | ||
find_package_handle_standard_args( QWT DEFAULT_MSG QWT_LIBRARY QWT_INCLUDE_DIR _QWT_VERSION_MATCH ) |
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.
The capitalization might be important here. I think it would be the difference between QWT_FOUND
vs Qwt_FOUND
being set.
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 changed the capitalization so ament_lint_cmake would stop throwing warnings, is there a way to silence the linting for this? :o
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.
According to the file itself, the variable that's being set is
# QWT_FOUND - the system has Qwt
So I think we can change it? The error's coming from the CMAKE_MODULE_PATH call.
I've updated it to:
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
fuse_loss/test/CMakeLists.txt
Outdated
|
||
# Find Qwt using FindQwt.cmake copied from: | ||
# https://gitlab.kitware.com/cmake/community/-/wikis/contrib/modules/FindQwt | ||
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") |
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.
This path is incorrect since it was moved to the test
directory.
Addressed! |
457bc4e
to
99216c2
Compare
@ros-pull-request-builder retest this please |
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: methylDragon <methylDragon@gmail.com>
Signed-off-by: methylDragon <methylDragon@gmail.com>
99216c2
to
25e6567
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.
LGTM with one small fix
All tests pass locally except cpplint, uncrustify, and copyright, but that's expected to be fixed in the next PR.
fuse_loss/package.xml
Outdated
@@ -11,19 +11,26 @@ | |||
<author email="swilliams@locusrobotics.com">Stephen Williams</author> | |||
<license>BSD</license> | |||
|
|||
<buildtool_depend>catkin</buildtool_depend> | |||
<buildtool_depend>ament_cmake</buildtool_depend> |
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.
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.
Signed-off-by: methylDragon <methylDragon@gmail.com>
25e6567
to
7e4da3d
Compare
See: #276
Description
This PR ports the entirety of fuse_loss, including:
It makes minor changes to fuse_core to support the loss changes.
Also note that some changes to fuse_model were made (that won't allow it to get built, but are put in for posterity.)
Other stuff like docs are in other PRs
Notes
Pinging @svwilliams for visibility.