Would i by using them as monocular cameras be able to still synchronize them to the same accuracy, or is the synchronization handled by the media server?
I use the Orin NX 16, so that should support hardware encoding.
Do you have any other ideas of what i should investigate or change to use less resources on the media server? My requirements is basicly only to get synchronized image pairs and get the IMU data, so disabling the depth modules and other stuff would be okay if that could reduce the resources used
When i run this example or just run the ros2 wrapper on a single camera the node starts correctly, but once i subscribe to one of the topics the node crashes with the following error “[ERROR] [component_container_isolated-2]: process has died [pid 828547, exit code -11, cmd ‘/opt/ros/humble/lib/rclcpp_components/component_container_isolated --use_multi_threaded_executor --ros-args --log-level info --ros-args -r __node:=zed_container -r __ns:=/zed’].” It advertices the topics, but if i subscribe to any of them the node crashes
ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zedxonegs. I can see it chooses the right serial number and it advertises the topics. I run it in docker with nvidia isaac ros container using your guide
Sound good, thank you. If i just need to get images and imu data from the cameras without needing the rest of the SDK, should i then use the zedx-one-capture repo maybe? I want to simplify it as much as possible since all i need right now is synchronized video with imu data, but i cant see how to get the imu data from that repo. Can i use your regular SDK for these cameras without using the media server or is it only zedx-one-capture i can use for that?
The modification that we are applying is bigger, but you should be able to make it work by changing pubImg.publish(std::move(image), std::move(camInfoMsg));
to pubImg.publish(std::move(image), *camInfoMsg);
here:
This works correctly because the camera_info topic content does not change while the node runs
I added the changes you requested, but it cant compile since there is no matching function in image_transport it seems like. I get the following error:
/workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/src/zed_camera_one_component.cpp: In member function ‘void stereolabs::ZedCameraOne::publishImageWithInfo(const sl::Mat&, const image_transport::CameraPublisher&, stereolabs::camInfoMsgPtr&, const string&, const rclcpp::Time&)’:
/workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/src/zed_camera_one_component.cpp:2894:19: error: no matching function for call to ‘image_transport::CameraPublisher::publish(std::remove_reference<std::unique_ptr<sensor_msgs::msg::Image_<std::allocator<void> >, std::default_delete<sensor_msgs::msg::Image_<std::allocator<void> > > >&>::type, std::__shared_ptr_access<sensor_msgs::msg::CameraInfo_<std::allocator<void> >, __gnu_cxx::_S_atomic, false, false>::element_type&) const’
2894 | pubImg.publish(std::move(image), *camInfoMsg);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /opt/ros/humble/include/image_transport/image_transport/image_transport.hpp:39,
from /workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/tools/include/sl_types.hpp:32,
from /workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/include/zed_camera_one_component.hpp:26,
from /workspaces/isaac_ros-dev/src/zed-ros2-wrapper/zed_components/src/zed_camera/src/zed_camera_one_component.cpp:15:
/opt/ros/humble/include/image_transport/image_transport/camera_publisher.hpp:103:8: note: candidate: ‘void image_transport::CameraPublisher::publish(const Image&, const CameraInfo&) const’
103 | void publish(
| ^~~~~~~
/opt/ros/humble/include/image_transport/image_transport/camera_publisher.hpp:104:37: note: no known conversion for argument 1 from ‘std::remove_reference<std::unique_ptr<sensor_msgs::msg::Image_<std::allocator<void> >, std::default_delete<sensor_msgs::msg::Image_<std::allocator<void> > > >&>::type’ {aka ‘std::unique_ptr<sensor_msgs::msg::Image_<std::allocator<void> >, std::default_delete<sensor_msgs::msg::Image_<std::allocator<void> > > >’} to ‘const Image&’ {aka ‘const sensor_msgs::msg::Image_<std::allocator<void> >&’}
104 | const sensor_msgs::msg::Image & image,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
/opt/ros/humble/include/image_transport/image_transport/camera_publisher.hpp:111:8: note: candidate: ‘void image_transport::CameraPublisher::publish(const ConstSharedPtr&, const ConstSharedPtr&) const’
111 | void publish(
| ^~~~~~~
/opt/ros/humble/include/image_transport/image_transport/camera_publisher.hpp:113:58: note: no known conversion for argument 2 from ‘std::__shared_ptr_access<sensor_msgs::msg::CameraInfo_<std::allocator<void> >, __gnu_cxx::_S_atomic, false, false>::element_type’ {aka ‘sensor_msgs::msg::CameraInfo_<std::allocator<void> >’} to ‘const ConstSharedPtr&’ {aka ‘const std::shared_ptr<const sensor_msgs::msg::CameraInfo_<std::allocator<void> > >&’}
113 | const sensor_msgs::msg::CameraInfo::ConstSharedPtr & info) const;
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
/opt/ros/humble/include/image_transport/image_transport/camera_publisher.hpp:123:8: note: candidate: ‘void image_transport::CameraPublisher::publish(sensor_msgs::msg::Image&, sensor_msgs::msg::CameraInfo&, rclcpp::Time) const’
123 | void publish(
| ^~~~~~~
/opt/ros/humble/include/image_transport/image_transport/camera_publisher.hpp:123:8: note: candidate expects 3 arguments, 2 provided
Can i somehow just use the zedx-one-capture repo or similar to just get synced images and imu data from the cameras without the overhead of the ros wrapper and depth modules etc?
Thank you, i will try that. Im also looking at just using your SDK for retrieving images and imu data without the ros wrapper. I see there is a tutorial for ZED X one for a single camera. If i use that and create a instance of the class CameraOne for each camera, would it then be synced or do i have to do something else to sync them when using your SDK? The example i am looking at is the file called live.cpp