How am I going to be able to publish depthai-ros pointcloud2 messages with a "no IMU" Oak-D-Lite camera?
I've confirmed I can successfully run:
- depthai-ros camera, (RGB video and MobileNet NN detections)
changed camera.yaml for "no IMU":
depthai-ros/depthai_ros_driver/config $ diff camera.yaml camera.yaml.orig
4c4
< i_enable_imu: false
---
> i_enable_imu: true
ros2 launch depthai_ros_driver camera.launch.py
cmds/echo_oak_nn_spatial_detections.sh
** detections:
class_id='9', score=0.63134765625
class_id='11', score=0.509765625
yolo4 publisher (RGB video and yolo detections as ROS 2 Humble topics)
ros2 launch depthai_examples yolov4_publisher.launch.py camera_model:=OAK-D-LITE spatial_camera:=false
mobilenet publisher node: (RGB image and mobilenet detections)
ros2 launch depthai_examples mobile_publisher.launch.py camera_model:=OAK-D-LITE
but no success with (all fail with no IMU error):
rgbd.pcl.launch.py
ros2 launch depthai_ros_driver rgbd.pcl.launch.py
...
[component_container-1] [ERROR] [1706942642.296201358] [oak_container]: Component constructor threw an exception: IMU(9) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 0, 328
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'oak' of type 'depthai_ros_driver::Camera' in container '/oak_container': Component constructor threw an exception: IMU(9) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 0, 328
example_segmentation.launch.py
ros2 launch depthai_ros_driver example_segmentation.launch.py
...
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'oak' of type 'depthai_ros_driver::Camera' in container '/oak_container': Component constructor threw an exception: IMU(7) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU
pointcloud.launch.py
ros2 launch depthai_ros_driver pointcloud.launch.py
...
[component_container-1] [ERROR] [1706942958.672348873] [oak_container]: Component constructor threw an exception: IMU(10) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 0, 328
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'oak' of type 'depthai_ros_driver::Camera' in container '/oak_container': Component constructor threw an exception: IMU(10) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU
- rtabmap.launch.py
ros2 launch depthai_ros_driver rtabmap.launch.py
...
[component_container-1] [ERROR] [1706942114.645790128] [oak_container]: Component constructor threw an exception: IMU(9) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 0, 328
[ERROR] [launch_ros.actions.load_composable_nodes]: Failed to load node 'oak' of type 'depthai_ros_driver::Camera' in container '/oak_container': Component constructor threw an exception: IMU(9) - IMU invalid settings!: IMU not detected. Your board doesn't have IMU or requires firmware update (Set imu.enableFirmwareUpdate(True) explicitly.). 0, 328
...
and cannot use the basic oak camera to roll my own:
mre.py: (stripped down to minimum reproducible error from the non-ROS Pointcloud example)
from depthai_sdk import OakCamera
with OakCamera() as oak:
color = oak.camera('color')
$ python3 mre.py
Closing OAK camera
Traceback (most recent call last):
File "/home/pi/wali_pi5/dai_ws/mre.py", line 4, in <module>
color = oak.camera('color')
AttributeError: 'OakCamera' object has no attribute 'camera'
and if I change to oak.create_camera('color') it the pointcloud demo fails with:
$ python3 pointcloud.py
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__enter__', '__eq__', '__exit__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_callback', '_init_device', 'build', 'callback', 'config_camera', 'config_pipeline', 'create_camera', 'create_imu', 'create_nn', 'create_stereo', 'device', 'poll', 'record', 'running', 'sensors', 'show_graph', 'start', 'sync', 'visualize']
Closing OAK camera
Traceback (most recent call last):
File "/home/pi/wali_pi5/systests/Oak-D-Lite/vdepthai/depthai/depthai_sdk/examples/PointcloudComponent/pointcloud.py", line 9, in <module>
pcl = oak.create_pointcloud(stereo=stereo, colorize=color)
AttributeError: 'OakCamera' object has no attribute 'create_pointcloud'
UPDATE:
In my environment the installed oak_camera.py
lib/python3.11/site-packages/depthai_sdk/oak_camera.py
does not include the create_pointcloud class method.
This file does: depthai/depthai_sdk/src/depthai_sdk/oak_camera.py
but that file expects ahrs.filters in xout_imu.py which also is missing in the installed site-packages.
Seeing this leads me to believe that even if the create_pointcloud() method existed, the lack of an IMU in my particular Oak-D-Lite would prevent me from using the method.
Someone with a TurtleBot3 mentioned using a ROS package that subscribes to DepthClouds to output PointClouds - guessing that is the route I need to investigate.