berndpfrommer / flir_spinnaker_ros2

ros2 driver for flir spinnaker SDK
26 stars 27 forks source link

Can't build from source #8

Closed pepeRossRobotics closed 2 years ago

pepeRossRobotics commented 2 years ago

Hello, I manually cloned the repository along with the flir_spinnaker_common and the camera_control_msgs_ros2.

When I try to build, I get this error:

--- stderr: flir_spinnaker_ros2                                                 
/home/pepe/ross_robotics/mk4_ws/src/extrm_mk4/ccu/mk4_sensing/flir_spinnaker_ros2/src/camera_driver.cpp: In member function ‘bool flir_spinnaker_ros2::CameraDriver::setInt(const string&, int)’:
/home/pepe/ross_robotics/mk4_ws/src/extrm_mk4/ccu/mk4_sensing/flir_spinnaker_ros2/src/camera_driver.cpp:286:30: error: ‘using element_type = class flir_spinnaker_common::Driver’ {aka ‘class flir_spinnaker_common::Driver’} has no member named ‘setInt’
  286 |   std::string msg = driver_->setInt(nodeName, v, &retV);
      |                              ^~~~~~
make[2]: *** [CMakeFiles/camera_driver.dir/build.make:63: CMakeFiles/camera_driver.dir/src/camera_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:80: CMakeFiles/camera_driver.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

I fell that the flir_spinnaker_common repository is missing an update. could you confirm if it is up to date?

best, Pepe

berndpfrommer commented 2 years ago

Yes, something's broken. Working on it.

berndpfrommer commented 2 years ago

@FranzAlbers could you please file a PR against the flir_spinnaker_common repo with the missing setInt() method added?

berndpfrommer commented 2 years ago

@pepeRossRobotics I pushed a temporary fix until @FranzAlbers files a PR with a tested implementation. Can you see if it compiles now for you? The driver should work so long as you don't set integer parameters (which may also work but has not been tested)

FranzAlbers commented 2 years ago

Sorry for missing pushing the setInt method to the flir_spinnaker_common repo, @berndpfrommer!

I can confirm that the driver compiles with your temporary fix and that setting integer parameters works.

Besides the templates for set_invalid(), I used more or less exactly the same code, so I propose making this temporary fix a permanent one without another PR from my side.

berndpfrommer commented 2 years ago

@FranzAlbers sounds good, thanks for the super fast reply!