depthai-ros icon indicating copy to clipboard operation
depthai-ros copied to clipboard

[BUG] IMU `header.frame_name` generated incorrectly

Open mrjogo opened this issue 4 months ago • 2 comments

Describe the bug

camera_node creates the IMU TF frame by prepending the value of the parameter camera.i_tf_base_frame to _imu_frame. So, for example, if camera.i_tf_base_frame:=my_base_tf, it is my_base_tf_imu_frame.

However, in the IMU data header (ie, /my_node_name/imu/data) it incorrectly prepends the node name:

$ ros2 topic echo --once /my_node_name/imu/data
header:
  stamp:
    sec: 1756322044
    nanosec: 405311703
  frame_id: my_node_name_imu_frame
orientation:
...etc

Minimal Reproducible Example

# depthai.launch.py
from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    return LaunchDescription(
        [
            Node(
                package="depthai_ros_driver",
                executable="camera_node",
                name="my_node_name",
                parameters=[
                    {
                        "camera.i_publish_tf_from_calibration": True,
                        "camera.i_tf_base_frame": "my_base_tf",
                    },
                ],
            )
        ]
    )

Expected behavior

IMU data's header.frame_name should have ${camera.i_tf_base_frame} + _imu_frame

Screenshots

N/A

Pipeline Graph

N/A

Attach system log

{
    "architecture": "64bit ELF",
    "machine": "x86_64",
    "platform": "Linux-6.14.0-27-generic-x86_64-with-glibc2.39",
    "processor": "x86_64",
    "python_build": "main Jun 18 2025 17:59:45",
    "python_compiler": "GCC 13.3.0",
    "python_implementation": "CPython",
    "python_version": "3.12.3",
    "release": "6.14.0-27-generic",
    "system": "Linux",
    "version": "#27~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 17:38:49 UTC 2",
    "win32_ver": "",
    "packages": [
        "action-msgs==2.0.2",
        "actionlib-msgs==5.3.6",
        "actuator-msgs==0.0.1",
        "ament-cmake-google-benchmark==2.5.4",
        "ament-cmake-test==2.5.4",
        "ament-copyright==0.17.2",
        "ament-cppcheck==0.17.2",
        "ament-cpplint==0.17.2",
        "ament-flake8==0.17.2",
        "ament-index-python==1.8.1",
        "ament-lint==0.17.2",
        "ament-lint-cmake==0.17.2",
        "ament-package==0.16.4",
        "ament-pep257==0.17.2",
        "ament-uncrustify==0.17.2",
        "ament-xmllint==0.17.2",
        "angles==1.16.0",
        "appdirs==1.4.4",
        "apriltag-msgs==2.0.1",
        "ar-gripper==0.1.0",
        "ar-gripper-interfaces==0.1.0",
        "argcomplete==3.1.4",
        "aruco-msgs==5.0.5",
        "aruco-opencv-msgs==6.0.2",
        "attrs==23.2.0",
        "Babel==2.10.3",
        "# Editable install with no version control (barbot-app==0.0.0)\n-e /home/ros/dev_ws/build/barbot_app",
        "barbot-interfaces==0.0.0",
        "# Editable install with no version control (barbot-moveit-config==0.0.0)\n-e /home/ros/dev_ws/build/barbot_moveit_config",
        "barbot-perception==0.0.0",
        "bcc==0.29.1",
        "beautifulsoup4==4.12.3",
        "black==24.2.0",
        "blinker==1.7.0",
        "Brlapi==0.8.5",
        "Brotli==1.1.0",
        "btcpp-ros2-interfaces==0.2.0",
        "builtin-interfaces==2.0.2",
        "camera-calibration==5.0.11",
        "catkin-pkg-modules==1.0.0",
        "certifi==2023.11.17",
        "chardet==5.2.0",
        "click==8.1.6",
        "cloud-init==25.1.4",
        "colcon-argcomplete==0.3.3",
        "colcon-bash==0.5.0",
        "colcon-cd==0.2.1",
        "colcon-cmake==0.2.29",
        "colcon-common-extensions==0.3.0",
        "colcon-core==0.20.0",
        "colcon-defaults==0.2.9",
        "colcon-devtools==0.3.0",
        "colcon-installed-package-information==0.2.1",
        "colcon-library-path==0.2.1",
        "colcon-metadata==0.2.5",
        "colcon-notification==0.3.0",
        "colcon-output==0.2.13",
        "colcon-override-check==0.0.1",
        "colcon-package-information==0.4.0",
        "colcon-package-selection==0.2.10",
        "colcon-parallel-executor==0.3.0",
        "colcon-pkg-config==0.1.0",
        "colcon-powershell==0.4.0",
        "colcon-python-setup-py==0.2.9",
        "colcon-recursive-crawl==0.2.3",
        "colcon-ros==0.5.0",
        "colcon-test-result==0.3.8",
        "colcon-zsh==0.5.0",
        "colorama==0.4.6",
        "command-not-found==0.3",
        "composition-interfaces==2.0.2",
        "configobj==5.0.8",
        "contourpy==1.0.7",
        "control-msgs==5.4.1",
        "controller-manager==4.32.0",
        "controller-manager-msgs==4.32.0",
        "coverage==7.4.4",
        "cryptography==41.0.7",
        "cssselect==1.2.0",
        "cupshelpers==1.0",
        "cv-bridge==4.1.0",
        "cycler==0.11.0",
        "dbus-python==1.3.2",
        "decorator==5.1.1",
        "defer==1.0.6",
        "Deprecated==1.2.14",
        "depthai==2.30.0.0",
        "depthai-ros-driver==2.11.2",
        "depthai-ros-msgs==2.11.2",
        "diagnostic-msgs==5.3.6",
        "diagnostic-updater==4.2.6",
        "distlib==0.3.8",
        "distro==1.9.0",
        "distro-info==1.7+build1",
        "docutils==0.20.1",
        "domain-coordinator==0.12.0",
        "empy==3.3.4",
        "ffmpeg-image-transport-msgs==1.0.2",
        "filelock==3.13.1",
        "flake8==7.0.0",
        "flake8-builtins==2.1.0",
        "flake8-comprehensions==3.14.0",
        "flake8-docstrings==1.6.0",
        "flake8-import-order==0.18.2",
        "flake8-quotes==3.4.0",
        "fonttools==4.46.0",
        "foxglove-msgs==3.1.0",
        "fs==2.4.16",
        "fsspec==2025.7.0",
        "generate-parameter-library-py==0.5.0",
        "geographic-msgs==1.0.6",
        "geometry-msgs==5.3.6",
        "gps-msgs==2.1.0",
        "graph-msgs==0.2.0",
        "hf-xet==1.1.8",
        "html5lib==1.1",
        "httplib2==0.20.4",
        "huggingface-hub==0.34.4",
        "idna==3.6",
        "image-geometry==4.1.0",
        "importlib-metadata==4.12.0",
        "iniconfig==1.1.1",
        "interactive-markers==2.5.4",
        "isort==5.6.4",
        "Jinja2==3.1.2",
        "joint-state-publisher==2.4.0",
        "joint-state-publisher-gui==2.4.0",
        "jsonpatch==1.32",
        "jsonpointer==2.0",
        "jsonschema==4.10.3",
        "kiwisolver==0.0.0",
        "language-selector==0.1",
        "lark==1.1.9",
        "laser-geometry==2.7.1",
        "launch==3.4.5",
        "launch-param-builder==0.1.1",
        "launch-pytest==3.4.5",
        "launch-ros==0.26.8",
        "launch-testing==3.4.5",
        "launch-testing-ros==0.26.8",
        "launch-xml==3.4.5",
        "launch-yaml==3.4.5",
        "launchpadlib==1.11.0",
        "lazr.restfulclient==0.14.6",
        "lazr.uri==1.0.6",
        "lifecycle-msgs==2.0.2",
        "louis==3.29.0",
        "lxml==5.2.1",
        "lz4==4.0.2+dfsg",
        "map-msgs==2.4.1",
        "markdown-it-py==3.0.0",
        "MarkupSafe==2.1.5",
        "matplotlib==3.6.3",
        "mccabe==0.7.0",
        "mdurl==0.1.2",
        "message-filters==4.11.6",
        "more-itertools==10.2.0",
        "moveit==0.1.3",
        "moveit-configs-utils==2.14.0",
        "moveit-msgs==2.7.1",
        "moveit-task-constructor-msgs==0.1.3",
        "mpi4py==3.1.5",
        "mpmath==1.3.0",
        "mypy-extensions==1.0.0",
        "nav-msgs==5.3.6",
        "nav2-msgs==1.3.7",
        "netaddr==0.8.0",
        "netifaces==0.11.0",
        "networkx==3.5",
        "notify2==0.3",
        "numpy==1.26.4",
        "nvidia-cublas-cu12==12.8.4.1",
        "nvidia-cuda-cupti-cu12==12.8.90",
        "nvidia-cuda-nvrtc-cu12==12.8.93",
        "nvidia-cuda-runtime-cu12==12.8.90",
        "nvidia-cudnn-cu12==9.10.2.21",
        "nvidia-cufft-cu12==11.3.3.83",
        "nvidia-cufile-cu12==1.13.1.3",
        "nvidia-curand-cu12==10.3.9.90",
        "nvidia-cusolver-cu12==11.7.3.90",
        "nvidia-cusparse-cu12==12.5.8.93",
        "nvidia-cusparselt-cu12==0.7.1",
        "nvidia-nccl-cu12==2.27.3",
        "nvidia-nvjitlink-cu12==12.8.93",
        "nvidia-nvtx-cu12==12.8.90",
        "oauthlib==3.2.2",
        "object-recognition-msgs==2.0.0",
        "octomap-msgs==2.0.1",
        "olefile==0.46",
        "osrf-pycommon==2.1.6",
        "packaging==24.0",
        "pal-statistics==2.6.2",
        "pal-statistics-msgs==2.6.2",
        "pathspec==0.12.1",
        "pcl-msgs==1.0.0",
        "pexpect==4.9.0",
        "pillow==10.2.0",
        "pip==24.0",
        "platformdirs==4.2.0",
        "pluggy==1.4.0",
        "protobuf==4.21.12",
        "psutil==5.9.8",
        "ptyprocess==0.7.0",
        "pycairo==1.25.1",
        "pycodestyle==2.11.1",
        "pycups==2.0.1",
        "pydocstyle==6.3.0",
        "pyflakes==3.2.0",
        "Pygments==2.17.2",
        "PyGObject==3.48.2",
        "pygraphviz==1.7",
        "PyJWT==2.7.0",
        "pyparsing==3.1.1",
        "PyQt5==5.15.10",
        "PyQt5-sip==12.13.0",
        "pyrsistent==0.20.0",
        "pyserial==3.5",
        "pytest==7.4.4",
        "pytest-cov==4.1.0",
        "python-apt==2.7.7+ubuntu3",
        "python-dateutil==2.8.2",
        "python-debian==0.1.49+ubuntu2",
        "python-qt-binding==2.2.1",
        "pytz==2024.1",
        "pyxdg==0.28",
        "PyYAML==6.0.1",
        "qt-gui==2.7.5",
        "qt-gui-cpp==2.7.5",
        "qt-gui-py-common==2.7.5",
        "rcl-interfaces==2.0.2",
        "rclpy==7.1.4",
        "rcutils==6.7.2",
        "regex==2022.10.31",
        "requests==2.31.0",
        "resource-retriever==3.4.4",
        "rich==13.7.1",
        "rmw-dds-common==3.1.0",
        "roman==3.3",
        "ros-gz-bridge==1.0.15",
        "ros-gz-interfaces==1.0.15",
        "ros-gz-sim==1.0.15",
        "ros2-controllers-test-nodes==4.27.0",
        "ros2action==0.32.4",
        "ros2bag==0.26.7",
        "ros2bag-mcap-cli==0.26.7",
        "ros2bag-sqlite3-cli==0.26.7",
        "ros2cli==0.32.4",
        "ros2component==0.32.4",
        "ros2controlcli==4.32.0",
        "ros2doctor==0.32.4",
        "ros2interface==0.32.4",
        "ros2launch==0.26.8",
        "ros2lifecycle==0.32.4",
        "ros2multicast==0.32.4",
        "ros2node==0.32.4",
        "ros2param==0.32.4",
        "ros2pkg==0.32.4",
        "ros2run==0.32.4",
        "ros2service==0.32.4",
        "ros2test==0.6.0",
        "ros2topic==0.32.4",
        "rosbag2-interfaces==0.26.7",
        "rosbag2-py==0.26.7",
        "rosdep==0.26.0",
        "rosdep-modules==0.26.0",
        "rosdistro-modules==1.0.1",
        "rosgraph-msgs==2.0.2",
        "rosidl-adapter==4.6.5",
        "rosidl-cli==4.6.5",
        "rosidl-cmake==4.6.5",
        "rosidl-generator-c==4.6.5",
        "rosidl-generator-cpp==4.6.5",
        "rosidl-generator-py==0.22.1",
        "rosidl-generator-type-description==4.6.5",
        "rosidl-parser==4.6.5",
        "rosidl-pycommon==4.6.5",
        "rosidl-runtime-py==0.13.1",
        "rosidl-typesupport-c==3.2.2",
        "rosidl-typesupport-cpp==3.2.2",
        "rosidl-typesupport-fastrtps-c==3.6.1",
        "rosidl-typesupport-fastrtps-cpp==3.6.1",
        "rosidl-typesupport-introspection-c==4.6.5",
        "rosidl-typesupport-introspection-cpp==4.6.5",
        "rospkg-modules==1.6.0",
        "rpyutils==0.4.1",
        "rqt-console==2.2.1",
        "rqt-gui==1.6.0",
        "rqt-gui-py==1.6.0",
        "rqt-plot==1.4.3",
        "rqt-py-common==1.6.0",
        "rqt-topic==1.7.3",
        "rtabmap-msgs==0.22.1",
        "rtabmap-python==0.1.0",
        "safetensors==0.6.2",
        "SciPy==1.11.4",
        "screen-resolution-extra==0.0.0",
        "semver==2.10.2",
        "sensor-msgs==5.3.6",
        "sensor-msgs-py==5.3.6",
        "service-msgs==2.0.2",
        "setuptools==68.1.2",
        "shape-msgs==5.3.6",
        "six==1.16.0",
        "snowballstemmer==2.2.0",
        "soupsieve==2.5",
        "srdfdom==2.0.7",
        "sros2==0.13.3",
        "ssh-import-id==5.11",
        "statistics-msgs==2.0.2",
        "std-msgs==5.3.6",
        "std-srvs==5.3.6",
        "stereo-msgs==5.3.6",
        "sympy==1.14.0",
        "systemd-python==235",
        "tf2-geometry-msgs==0.36.12",
        "tf2-kdl==0.36.12",
        "tf2-msgs==0.36.12",
        "tf2-py==0.36.12",
        "tf2-ros-py==0.36.12",
        "tf2-tools==0.36.12",
        "theora-image-transport==4.0.4",
        "tokenizers==0.21.4",
        "toml==0.10.2",
        "topic-tools==1.3.3",
        "topic-tools-interfaces==1.3.3",
        "torch==2.8.0",
        "torchvision==0.23.0",
        "tornado==6.4",
        "tqdm==4.67.1",
        "trajectory-msgs==5.3.6",
        "transformers==4.55.2",
        "triton==3.4.0",
        "type-description-interfaces==2.0.2",
        "typeguard==4.1.5",
        "typing_extensions==4.10.0",
        "ubuntu-drivers-common==0.0.0",
        "ubuntu-pro-client==8001",
        "ufoLib2==0.16.0",
        "ufw==0.36.2",
        "unattended-upgrades==0.1",
        "unicodedata2==15.1.0",
        "unique-identifier-msgs==2.5.0",
        "ur-dashboard-msgs==3.3.3",
        "ur-msgs==2.2.0",
        "ur-robot-driver==3.3.3",
        "urdfdom-py==1.2.1",
        "urllib3==2.0.7",
        "vcstool==0.3.0",
        "velodyne-msgs==2.5.1",
        "vision-msgs==4.1.1",
        "visualization-msgs==5.3.6",
        "wadllib==1.3.6",
        "webencodings==0.5.1",
        "wheel==0.42.0",
        "wrapt==1.15.0",
        "xacro==2.0.13",
        "xdg==5",
        "xkit==0.0.0",
        "zipp==1.0.0"
    ],
    "usb": [
        "NoLib"
    ],
    "uname": [
        "Linux barbot 6.14.0-27-generic #27~24.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jul 22 17:38:49 UTC 2 x86_64 x86_64"
    ]
}

  • Which OS/OS version are you using? Ubuntu 24.04.1
  • Which ROS version are you using? 2
  • Which ROS distribution are you using ? Jazzy
  • Is depthai-ros built from source or installed from apt? apt
  • Is depthai/depthai-core library installed from rosdep or manually? rosdep
  • Please include versions of following packages - apt show ros-$ROS_DISTRO-depthai ros-$ROS_DISTRO-depthai-ros ros-$ROS_DISTRO-depthai-bridge ros-$ROS_DISTRO-depthai-ros-msgs ros-$ROS_DISTRO-depthai-ros-driver:
Package: ros-jazzy-depthai
Version: 2.30.0-1noble.20250424.110737
Priority: optional
Section: misc
Maintainer: Adam Serafin <[email protected]>
Installed-Size: 68.2 MB
Depends: libc6 (>= 2.38), libgcc-s1 (>= 4.2), libopencv-core406t64 (>= 4.6.0+dfsg), libopencv-imgproc406t64 (>= 4.6.0+dfsg), libstdc++6 (>= 13.1), libopencv-dev, libusb-1.0-0-dev, nlohmann-json3-dev, ros-jazzy-ros-workspace
Homepage: https://www.luxonis.com/
Download-Size: 24.9 MB
APT-Manual-Installed: no
APT-Sources: http://packages.ros.org/ros2/ubuntu noble/main amd64 Packages
Description: DepthAI core is a C++ library which comes with firmware and an API to interact with OAK Platform

Package: ros-jazzy-depthai-ros
Version: 2.11.2-1noble.20250814.103406
Priority: optional
Section: misc
Maintainer: Adam Serafin <[email protected]>
Installed-Size: 44.0 kB
Depends: ros-jazzy-depthai, ros-jazzy-depthai-bridge, ros-jazzy-depthai-descriptions, ros-jazzy-depthai-examples, ros-jazzy-depthai-filters, ros-jazzy-depthai-ros-driver, ros-jazzy-depthai-ros-msgs, ros-jazzy-ros-workspace
Download-Size: 7,200 B
APT-Sources: http://packages.ros.org/ros2/ubuntu noble/main amd64 Packages
Description: The depthai-ros package

Package: ros-jazzy-depthai-bridge
Version: 2.11.2-1noble.20250814.084604
Priority: optional
Section: misc
Maintainer: Adam Serafin <[email protected]>
Installed-Size: 604 kB
Depends: libc6 (>= 2.38), libgcc-s1 (>= 3.3.1), libopencv-calib3d406t64 (>= 4.6.0+dfsg), libopencv-core406t64 (>= 4.6.0+dfsg), libopencv-imgcodecs406t64 (>= 4.6.0+dfsg), libopencv-imgproc406t64 (>= 4.6.0+dfsg), libstdc++6 (>= 13.1), libboost-dev, libopencv-dev, ros-jazzy-camera-info-manager, ros-jazzy-composition-interfaces, ros-jazzy-cv-bridge, ros-jazzy-depthai, ros-jazzy-depthai-ros-msgs, ros-jazzy-ffmpeg-image-transport-msgs, ros-jazzy-image-transport, ros-jazzy-rclcpp, ros-jazzy-robot-state-publisher, ros-jazzy-ros-environment, ros-jazzy-sensor-msgs, ros-jazzy-std-msgs, ros-jazzy-stereo-msgs, ros-jazzy-tf2, ros-jazzy-tf2-geometry-msgs, ros-jazzy-tf2-ros, ros-jazzy-vision-msgs, ros-jazzy-xacro, ros-jazzy-ros-workspace
Download-Size: 174 kB
APT-Sources: http://packages.ros.org/ros2/ubuntu noble/main amd64 Packages
Description: The depthai_bridge package

Package: ros-jazzy-depthai-ros-msgs
Version: 2.11.2-1noble.20250814.080551
Priority: optional
Section: misc
Maintainer: Adam Serafin <[email protected]>
Installed-Size: 2,730 kB
Depends: libc6 (>= 2.14), libgcc-s1 (>= 3.3.1), libpython3.12t64 (>= 3.12.1), libstdc++6 (>= 11), ros-jazzy-fastcdr, ros-jazzy-builtin-interfaces, ros-jazzy-geometry-msgs, ros-jazzy-rclcpp, ros-jazzy-rosidl-default-generators, ros-jazzy-sensor-msgs, ros-jazzy-std-msgs, ros-jazzy-vision-msgs, ros-jazzy-ros-workspace
Download-Size: 204 kB
APT-Sources: http://packages.ros.org/ros2/ubuntu noble/main amd64 Packages
Description: Package to keep interface independent of the driver

Package: ros-jazzy-depthai-ros-driver
Version: 2.11.2-1noble.20250814.101717
Priority: optional
Section: misc
Maintainer: Adam Serafin <[email protected]>
Installed-Size: 3,525 kB
Depends: libc6 (>= 2.38), libconsole-bridge1.0 (>= 1.0.1+dfsg2), libgcc-s1 (>= 3.3.1), libopencv-core406t64 (>= 4.6.0+dfsg), libopencv-imgproc406t64 (>= 4.6.0+dfsg), libstdc++6 (>= 13.1), libtinyxml2-10 (>= 10.0.0), ros-jazzy-ament-cmake-auto, ros-jazzy-camera-calibration, ros-jazzy-cv-bridge, ros-jazzy-depthai, ros-jazzy-depthai-bridge, ros-jazzy-depthai-descriptions, ros-jazzy-depthai-examples, ros-jazzy-depthai-ros-msgs, ros-jazzy-diagnostic-msgs, ros-jazzy-diagnostic-updater, ros-jazzy-ffmpeg-image-transport-msgs, ros-jazzy-image-pipeline, ros-jazzy-image-transport, ros-jazzy-image-transport-plugins, ros-jazzy-pluginlib, ros-jazzy-rclcpp, ros-jazzy-rclcpp-components, ros-jazzy-sensor-msgs, ros-jazzy-std-msgs, ros-jazzy-std-srvs, ros-jazzy-vision-msgs, ros-jazzy-ros-workspace
Download-Size: 750 kB
APT-Sources: http://packages.ros.org/ros2/ubuntu noble/main amd64 Packages
Description: Depthai ROS Monolithic node.

Additional context N/A

mrjogo avatar Aug 27 '25 19:08 mrjogo