Comments (5)
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.
Humble is not currently supported, but is on our backlog.
from azure_kinect_ros_driver.
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.
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.
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)
- MJPEG decode failed: -1 in Docker HOT 1
- Question: How to grab images from image topics. HOT 1
- Having the driver node running breaks our URDF HOT 2
- How to manually set exposure and white balance through the launch file?
- TF Tree for Azure is not regulary updating HOT 2
- Synchronize kinects on different hosts
- kinect_rgbd launch file does not parse sensor_sn properly HOT 3
- Workaround to use kinect_rgbd.launch with multiple cameras
- High CPU Load on default setting HOT 1
- Enable Composition and inter process communication
- Body Tracking SDK (1.1.2) is not Working With ROS Humble Branch directly On Windows 10
- how to set trigger mode of Azure kinect DK in this rospackage via MCU HOT 2
- [FATAL] [1691069372.183638523]: Failed to poll cameras: node cannot continue. HOT 3
- Compressed Image Transport - PNG compression requires 8/16-bit encoded color format (input format is: 32FC1)
- Installation problem HOT 4
- Two cameras using the same topic name
- parameter 'sensor_sn' has invalid type: expected [string] got [integer] HOT 2
- body_tracking_data topic doesn't have a header
- [ROS2 humble] tf_prefix parameter is not declared
- Query on Publishing 2D Skeleton Pixel Positions HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from azure_kinect_ros_driver.