Giter VIP home page Giter VIP logo

Comments (5)

francescosemeraro avatar francescosemeraro commented on May 26, 2024 1

Ok, I sorted it out. Apparently, you need to specify the duration in seconds and nanoseconds with two separate variables, while constructing the rclcpp::Duration object. Replacing this line with the highlighted one will do.

marker_msg->lifetime = rclcpp::Duration(int32_t(0),uint32_t(25000000));

from azure_kinect_ros_driver.

ooeygui avatar ooeygui commented on May 26, 2024

Humble is not currently supported, but is on our backlog.

from azure_kinect_ros_driver.

tonynajjar avatar tonynajjar commented on May 26, 2024

I got it to compile by adding defaults to the declare_parameter() functions. If you don't see much more effort to be put into it to support humble, I can create a PR (I would need a new humble branch)

from azure_kinect_ros_driver.

ooeygui avatar ooeygui commented on May 26, 2024

Thank you for the offer! I created a humble branch from foxy if you want to PR what you've done so far; that would definitely be helpful!
https://github.com/microsoft/Azure_Kinect_ROS_Driver/tree/humble

from azure_kinect_ros_driver.

francescosemeraro avatar francescosemeraro commented on May 26, 2024

Hi! Thanks for creating the branch. I am running ROS2 Humble on Ubuntu 22.04. When I try to build the package, I get the following error:

Starting >>> azure_kinect_ros_driver
--- stderr: azure_kinect_ros_driver
/home/francesco/humble_ws/src/Azure_Kinect_ROS_Driver/src/k4a_ros_device.cpp: In member function ‘k4a_result_t K4AROSDevice::getBodyMarker(const k4abt_body_t&, std::shared_ptr<visualization_msgs::msg::Marker_<std::allocator > >, int, rclcpp::Time)’:
/home/francesco/humble_ws/src/Azure_Kinect_ROS_Driver/src/k4a_ros_device.cpp:771:47: error: no matching function for call to ‘rclcpp::Duration::Duration(double)’
771 | marker_msg->lifetime = rclcpp::Duration(0.25);
| ^
In file included from /opt/ros/humble/include/rclcpp/rclcpp/qos.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_graph_interface.hpp:32,
from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:42,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:40,
from /opt/ros/humble/include/image_transport/image_transport/image_transport.hpp:37,
from /home/francesco/humble_ws/src/Azure_Kinect_ROS_Driver/include/azure_kinect_ros_driver/k4a_ros_device.h:15,
from /home/francesco/humble_ws/src/Azure_Kinect_ROS_Driver/src/k4a_ros_device.cpp:6:
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:48:3: note: candidate: ‘template<class Rep, class Period> rclcpp::Duration::Duration(const std::chrono::duration<_Rep1, _Period1>&)’
48 | Duration(const std::chrono::duration<Rep, Period> & duration) // NOLINT(runtime/explicit)
| ^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:48:3: note: template argument deduction/substitution failed:
/home/francesco/humble_ws/src/Azure_Kinect_ROS_Driver/src/k4a_ros_device.cpp:771:47: note: mismatched types ‘const std::chrono::duration<_Rep1, Period1>’ and ‘double’
771 | marker_msg->lifetime = rclcpp::Duration(0.25);
| ^
In file included from /opt/ros/humble/include/rclcpp/rclcpp/qos.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/node_interfaces/node_graph_interface.hpp:32,
from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:42,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/node.hpp:40,
from /opt/ros/humble/include/image_transport/image_transport/image_transport.hpp:37,
from /home/francesco/humble_ws/src/Azure_Kinect_ROS_Driver/include/azure_kinect_ros_driver/k4a_ros_device.h:15,
from /home/francesco/humble_ws/src/Azure_Kinect_ROS_Driver/src/k4a_ros_device.cpp:6:
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:151:3: note: candidate: ‘rclcpp::Duration::Duration()’
151 | Duration() = default;
| ^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:151:3: note: candidate expects 0 arguments, 1 provided
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:61:3: note: candidate: ‘rclcpp::Duration::Duration(const rclcpp::Duration&)’
61 | Duration(const Duration & rhs);
| ^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:61:29: note: no known conversion for argument 1 from ‘double’ to ‘const rclcpp::Duration&’
61 | Duration(const Duration & rhs);
| ~~~~~~~~~~~~~~~~~^~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:59:12: note: candidate: ‘rclcpp::Duration::Duration(const rcl_duration_t&)’
59 | explicit Duration(const rcl_duration_t & duration);
| ^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:59:44: note: no known conversion for argument 1 from ‘double’ to ‘const rcl_duration_t&’ {aka ‘const rcl_duration_s&’}
59 | explicit Duration(const rcl_duration_t & duration);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:53:3: note: candidate: ‘rclcpp::Duration::Duration(const Duration&)’
53 | Duration(const builtin_interfaces::msg::Duration & duration_msg); // NOLINT(runtime/explicit)
| ^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:53:54: note: no known conversion for argument 1 from ‘double’ to ‘const Duration&’ {aka ‘const builtin_interfaces::msg::Duration
<std::allocator >&’}
53 | Duration(const builtin_interfaces::msg::Duration & duration_msg); // NOLINT(runtime/explicit)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:42:12: note: candidate: ‘rclcpp::Duration::Duration(std::chrono::nanoseconds)’
42 | explicit Duration(std::chrono::nanoseconds nanoseconds);
| ^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:42:46: note: no known conversion for argument 1 from ‘double’ to ‘std::chrono::nanoseconds’ {aka ‘std::chrono::duration<long int, std::ratio<1, 1000000000> >’}
42 | explicit Duration(std::chrono::nanoseconds nanoseconds);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:39:3: note: candidate: ‘rclcpp::Duration::Duration(int32_t, uint32_t)’
39 | Duration(int32_t seconds, uint32_t nanoseconds);
| ^~~~~~~~
/opt/ros/humble/include/rclcpp/rclcpp/duration.hpp:39:3: note: candidate expects 2 arguments, 1 provided
gmake[2]: *** [CMakeFiles/azure_kinect_ros_driver_node.dir/build.make:90: CMakeFiles/azure_kinect_ros_driver_node.dir/src/k4a_ros_device.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/azure_kinect_ros_driver_node.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
Failed <<< azure_kinect_ros_driver [4.06s, exited with code 2]

In case it matters, I need to use libk4a1.4 and libk4abt1.1.
Any idea of why this could be happening? I am not sure that is related to the fact I am using Humble though.

from azure_kinect_ros_driver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.