luxonis / depthai-ros

Official ROS Driver for DepthAI Sensors.
MIT License
239 stars 173 forks source link

fix initialization of 'has_imu' property in depthai_descriptions model #417

Closed JenniferBuehler closed 9 months ago

JenniferBuehler commented 9 months ago

fix flag has_imu in xacro macro depthai_camera to also support the OAK-D PRO and POE models.

Overview

Author: Jennifer Buehler

The flag has_imu in xacro macro depthai_camera is only set for the OAK-D model. With the other cameras which have an IMU it doesn't work.

It should instead be

<xacro:if value="${model in ['OAK-D', 'OAK-D-PRO', 'OAK-D-POE']}">
  <xacro:property name="has_imu" value="true" />
</xacro:if>

Issue

Issue link (if present): n/a

Issue description: the flag has_imu in the depthai_camera macro is only set to true for the 'OAK-D' model, although PRO and POE also have IMUs.

Changes

ROS distro: humble, kinetic, probably all List of changes: fix depthai_camera initialization of property has_imu

Testing

Hardware used: Oak-D-Pro W Depthai library version: current (2023-09-23) ROS kinetic package depthai-ros

Visuals from testing

n/a, a screenshot of a non-existent IMU in RViz could be made but that's not really helpful

Serafadam commented 9 months ago

Thanks for the PR!

JenniferBuehler commented 9 months ago

You're welcome. Thanks for the quick merge.

I actually need this for kinetic, is it backported automatically or would you like me to post the same PR to the kinetic branch?

Serafadam commented 9 months ago

Hi, unfortunately kinetic distribution is not officially supported as it reached EOL in 2021, currently only officially supported ROS1 distribution is noetic.

JenniferBuehler commented 9 months ago

Hi, ahrg I meant noetic of course, wasn't thinking ;)

Serafadam commented 9 months ago

Hi, yes, fix will be merged in https://github.com/luxonis/depthai-ros/pull/424