Open abAgriRobot opened 3 months ago
As an update, since this issue was quite blocking for our application, we decided to implement a ROS 2 node to record the SVO files for the two cameras using the SDK directly. Following the examples:
We were able to record SVO files without any issue.
However, we came accros the following bug:
Since we were using the is_recording flag for starting and stopping the recording. This issue only allowed us to record once, after that the camera would remain with is_recording=true and I it would prevent us from starting a new recording. We added our own flag to keep track of the actual status of the cameras and with this we were able to record multiple SVO files for each camera, starting and stopping the recording without issues.
Once thing that we noticed is that due to the disableRecording bug, if the logic to check the actual status of the camera fails, and we start a new recording while there is an ongoing recording session running, then the node would try to start two new threads for the SVO recording and this would crash the node since the cameras were already in use. Maybe this could be related to the issue with the wrapper. We didn't investigate much further into this issue since with the correct logic this situation is avoided and the recording process is completed as expected.
Hi @abAgriRobot
the disableRecording
issue will be addressed by the ZED SDK v4.1 which will be released very soon.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days
Just commenting to keep the issue alive
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment otherwise it will be automatically closed in 5 days
I haven't had a chance to test the new SDK yet.
Preliminary Checks
Description
I'm launching the zed wrapper with two cameras, the bringup part is fine and the nodes and topics are available. However, when recording SVO files using the provided ROS 2 services, the node crashes after receiving the service call to stop the recording.
Steps to Reproduce
import os
from ament_index_python.packages import get_package_share_directory from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch import LaunchDescription from launch.actions import ( DeclareLaunchArgument, OpaqueFunction, IncludeLaunchDescription, LogInfo, ) from launch.conditions import IfCondition from launch.substitutions import LaunchConfiguration, Command, TextSubstitution from launch_ros.actions import Node
def parse_array_param(param): str = param.replace("[", "") str = str.replace("]", "") str = str.replace(" ", "") arr = str.split(",")
def launch_setup(context, *args, **kwargs):
URDF/xacro file to be loaded by the Robot State Publisher node
def generate_launch_description(): return LaunchDescription( [ DeclareLaunchArgument( "cam_names", description="An array containing the names of the cameras, e.g. [zed_front,zed_back]", ), DeclareLaunchArgument( "cam_models", description="An array containing the names of the cameras, e.g. [zed2i,zed2]", ), DeclareLaunchArgument( "cam_serials", description="An array containing the serial numbers of the cameras, e.g. [35199186,23154724]", ), DeclareLaunchArgument( "disable_tf", default_value="False", description="If
True
disable TF broadcasting for all the cameras in order to fuse visual odometry information externally.", ), OpaqueFunction(function=launch_setup), ] )Expected Result
N.B I have added extra INFO messages in order to follow the different calls that happen when the service is called. This is the only modification I did to the original code.
After calling the stop service, the recorded SVO is saved to disk and the node is ready to record again.
Actual Result
The node crashes after receiving the stop recording service call This behavior is not reproducible all the times, sometimes the recording process is completed without any issue, but the norm is that the node crashes after receiving the stop recording call.
It seems that the issue is due to the call to
mZed.disableRecording()
inside the methodZedCamera::stopSvoRecording()
ZED Camera model
ZED X
Environment
OS:
Ubuntu 20.04.4 LTS
CPU:model name : ARMv8 Processor rev 0 (v8l)
GPU:NVIDIA Jetson AGX Xavier (JAX)
Zed SKD:ZED SDK Version: 4.0.8 - Build 80393_b12da209