mrpt-ros-pkg / mrpt_sensors

ROS nodes for various robotics sensors via mrpt-hwdrivers
http://wiki.ros.org/mrpt_sensors
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

[Noetic] Failed to build mrpt_sensorlib after mrpt release #2

Closed sloretz closed 1 year ago

sloretz commented 1 year ago

It looks like mrpt_sensorlib is started failing to build around the time https://github.com/ros/rosdistro/pull/37538 was merged.

Perhaps an API was changed in mrpt?

https://build.ros.org/view/Nbin_ufv8_uFv8/job/Nbin_ufv8_uFv8__mrpt_sensorlib__ubuntu_focal_arm64__binary/21/console

20:45:57 /usr/lib/ccache/c++  -DROSCONSOLE_BACKEND_LOG4CXX -DROS_BUILD_SHARED_LIBS=1 -DROS_PACKAGE_NAME=\"mrpt_sensorlib\" -Dmrpt_sensorlib_EXPORTS -I/tmp/binarydeb/ros-noetic-mrpt-sensorlib-0.0.2/include -I/opt/ros/noetic/share/xmlrpcpp/cmake/../../../include/xmlrpcpp -isystem /opt/ros/noetic/include -isystem /opt/ros/noetic/include/mrpt/hwdrivers/include -isystem /opt/ros/noetic/include/mrpt/comms/include -isystem /opt/ros/noetic/include/mrpt/io/include -isystem /opt/ros/noetic/include/mrpt/system/include -isystem /opt/ros/noetic/include/mrpt/typemeta/include -isystem /opt/ros/noetic/include/mrpt/containers/include -isystem /opt/ros/noetic/include/mrpt/core/include -isystem /opt/ros/noetic/include/mrpt/maps/include -isystem /opt/ros/noetic/include/mrpt/obs/include -isystem /opt/ros/noetic/include/mrpt/opengl/include -isystem /opt/ros/noetic/include/mrpt/poses/include -isystem /opt/ros/noetic/include/mrpt/bayes/include -isystem /opt/ros/noetic/include/mrpt/math/include -isystem /usr/include/suitesparse -isystem /opt/ros/noetic/include/mrpt/serialization/include -isystem /opt/ros/noetic/include/mrpt/rtti/include -isystem /opt/ros/noetic/include/mrpt/random/include -isystem /usr/include/eigen3 -isystem /opt/ros/noetic/include/mrpt/config/include -isystem /opt/ros/noetic/include/mrpt/expr/include -isystem /opt/ros/noetic/include/mrpt/img/include -isystem /opt/ros/noetic/include/mrpt/tfest/include -isystem /opt/ros/noetic/include/mrpt/graphs/include -isystem /opt/ros/noetic/include/mrpt/gui/include -isystem /opt/ros/noetic/include/mrpt/nanogui/include -isystem /opt/ros/noetic/include/mrpt/vision/include  -g -O2 -fdebug-prefix-map=/tmp/binarydeb/ros-noetic-mrpt-sensorlib-0.0.2=. -fstack-protector-strong -Wformat -Werror=format-security -DNDEBUG -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC   -Wall -Wno-long-long -Wno-variadic-macros -Wno-ignored-attributes -Wno-int-in-bool-context -std=gnu++17 -o CMakeFiles/mrpt_sensorlib.dir/src/mrpt_sensorlib.cpp.o -c /tmp/binarydeb/ros-noetic-mrpt-sensorlib-0.0.2/src/mrpt_sensorlib.cpp
20:45:57 /tmp/binarydeb/ros-noetic-mrpt-sensorlib-0.0.2/src/mrpt_sensorlib.cpp: In member function ‘void mrpt_sensors::GenericSensorNode::run()’:
20:46:03 /tmp/binarydeb/ros-noetic-mrpt-sensorlib-0.0.2/src/mrpt_sensorlib.cpp:103:35: error: no matching function for call to ‘mrpt::hwdrivers::CGenericSensor::getObservations(mrpt::hwdrivers::CGenericSensor::TListObservations&)’
20:46:03   103 |   sensor_->getObservations(lstObjs);
20:46:03       |                                   ^
20:46:03 In file included from /tmp/binarydeb/ros-noetic-mrpt-sensorlib-0.0.2/include/mrpt_sensorlib/mrpt_sensorlib.h:6,
20:46:03                  from /tmp/binarydeb/ros-noetic-mrpt-sensorlib-0.0.2/src/mrpt_sensorlib.cpp:2:
20:46:03 /opt/ros/noetic/include/mrpt/hwdrivers/include/mrpt/hwdrivers/CGenericSensor.h:248:28: note: candidate: ‘virtual mrpt::hwdrivers::CGenericSensor::TListObservations mrpt::hwdrivers::CGenericSensor::getObservations()’
20:46:03   248 |  virtual TListObservations getObservations();
20:46:03       |                            ^~~~~~~~~~~~~~~
20:46:03 /opt/ros/noetic/include/mrpt/hwdrivers/include/mrpt/hwdrivers/CGenericSensor.h:248:28: note:   candidate expects 0 arguments, 1 provided

maybe this

https://github.com/mrpt-ros-pkg/mrpt_sensors/blob/5b92f9543f1720bf39e297124a04b3dbb3dd6174/mrpt_sensorlib/src/mrpt_sensorlib.cpp#L176

Should be changed to

lstObjs = _sensor->getObservations();

because of https://github.com/MRPT/mrpt/commit/08b53e7a0183396160454415a01fcdbf931a3605#diff-5382d0c3e1a64af3ae30b1563998d80fd7c9b517a796a6ec2406719ce2259ddaL248-R248

jlblancoc commented 1 year ago

Thanks! Yes it looks that's the issue, I'll fix it. I'm in the meantime investigating other weird series of failures for Mrpt packages only in humble (!), I'll head back to this one later.

jlblancoc commented 1 year ago

@sloretz Fixed via 8cd002621d714d437af410f4408f96d062626b1e

sloretz commented 1 year ago

Thanks @jlblancoc! Mind making a Noetic release with that fix within the next couple days? That will avoid 3 mrpt_* packages disappearing from the main apt repo when I do a Noetic sync this week.

https://discourse.ros.org/t/preparing-for-noetic-sync-2023-06-15/31924