Closed Neo-cyber-hubb closed 8 months ago
Besides, I have another question. For one of the four camera, the ros node would publish several topics like "/camera_publisher/rgb/image", "/camera_publisher/rgb/image/compressed", "/camera_publisher/rgb/depth". How can I change the code so that this ros node only publish the topic "/camera_publisher/rgb/image".
Looking forward to your reply. Thanks!
Hi, those additional publishers are created by image_transport
ROS mechanism for publishing image, it shouldn't impact anything, you can either edit bridge publisher code or create your own publisher to set up that clean, though then you would have to publish camera info separately (this is done in depthai_ros_driver
if you want to see an example). As for camera error, could you provide additional logs by running export DEPTHAI_DEBUG=1
before launching the files? Also, if you only want to publish image streams you can also use depthai_ros_driver
here.
Closing due to inactivity, please reopen if you have further questions/remarks.
Describe the bug
My device is OAK-FFC-4P. I rewrite the source file "depthai_examples/ros1_src/rgb_publisher.cpp" and the launch file "depthai_examples/launch/rgb_publisher.launch" to publish images from four different camera "rgb camd left right". The new files are named "camera_publisher.cpp" and "camera_publisher.launch". I'm running the following command:
roslaunch depthai_examples camera_publisher.launch
In most cases, it is normal. But, sometimes, I get this error:
fatal error. Please report to developers. Log: 'PlgSrcMipi' '981'
This is my source file "depthai_examples/ros1_src/camera_publisher.cpp".
`
include "ros/ros.h"
include
include
// #include "utility.hpp"
include "sensor_msgs/Image.h"
include <camera_info_manager/camera_info_manager.h>
// Inludes common necessary includes for development using depthai library
include "depthai/depthai.hpp"
include <depthai_bridge/BridgePublisher.hpp>
include <depthai_bridge/ImageConverter.hpp>
include <opencv2/opencv.hpp>
dai::Pipeline createPipeline(){ dai::Pipeline pipeline; auto colorCam_left = pipeline.create();
auto colorCam_right = pipeline.create();
auto colorCam_rgb = pipeline.create();
auto colorCam_camd = pipeline.create();
}
int main(int argc, char** argv){
} `
This is my launch file "depthai_examples/launch/camera_publisher.launch".
`<?xml version="1.0"?>
`