Closed cedricgoubard closed 2 years ago
Hi @cedricgoubard
there is an interesting warning:
[ WARN] [1651742971.624700659]: !!! Failed to get static transforms. Is the 'ROBOT STATE PUBLISHER' node correctly working?
indeed I cannot see the logs of the Robot State Publisher node that broadcasts the static TFs of the camera.
The 3 Hz problem is because the Positional Tracking module always waits for valid TF transformations before starting the elaborations.
You must provide the TF transforms in some way like we do in our launch files, for example: https://github.com/stereolabs/zed-ros-wrapper/blob/master/zed_wrapper/launch/include/zed_camera_nodelet.launch#L62-L64
Hi @Myzhar, Thank you for replying so quickly! I put the state publisher back in, and it fixed the issue :+1:
Preliminary Checks
Description
Hello,
I am trying to use the ZED2 camera to get RGB, depth and odometry data for a SLAM algorithm running on a Jetson Xavier NX. However, it looks like as soon as the positional tracking starts, both RGB and depth topics fall to ~3Hz
I tried disabling the positional tracking; I then get a good framerate for the RGB topic, but if I try to
rostopic hz
the depth topic, the positional tracking starts (even though I disable it) and all topics drop to 3Hz.Steps to Reproduce
Here is the launch file
```xmlHere is the common.yaml param file
```yaml # params/common.yaml # Common parameters to Stereolabs ZED and ZED mini cameras --- # Dynamic parameters cannot have a namespace brightness: 4 # Dynamic contrast: 4 # Dynamic hue: 0 # Dynamic saturation: 4 # Dynamic sharpness: 4 # Dynamic gamma: 8 # Dynamic - Requires SDK >=v3.1 auto_exposure_gain: true # Dynamic gain: 100 # Dynamic - works only if `auto_exposure_gain` is false exposure: 100 # Dynamic - works only if `auto_exposure_gain` is false auto_whitebalance: true # Dynamic whitebalance_temperature: 42 # Dynamic - works only if `auto_whitebalance` is false depth_confidence: 30 # Dynamic depth_texture_conf: 100 # Dynamic pub_frame_rate: 15.0 # Dynamic - frequency of publishing of video and depth data point_cloud_freq: 10.0 # Dynamic - frequency of the pointcloud publishing (equal or less to `grab_frame_rate` value) general: camera_name: zed # A name for the camera (can be different from camera model and node name and can be overwritten by the launch file) zed_id: 0 serial_number: 0 resolution: 2 # '0': HD2K, '1': HD1080, '2': HD720, '3': VGA grab_frame_rate: 15 # Frequency of frame grabbing for internal SDK operations gpu_id: -1 base_frame: 'zed2_base_link' # must be equal to the frame_id used in the URDF file verbose: false # Enable info message by the ZED SDK svo_compression: 2 # `0`: LOSSLESS, `1`: AVCHD, `2`: HEVC self_calib: true # enable/disable self calibration at starting camera_flip: false video: img_downsample_factor: 0.5 # Resample factor for images [0.01,1.0] The SDK works with native image sizes, but publishes rescaled image. extrinsic_in_camera_frame: true # if `false` extrinsic parameter in `camera_info` will use ROS native frame (X FORWARD, Z UP) instead of the camera frame (Z FORWARD, Y DOWN) [`true` use old behavior as for version < v3.1] depth: quality: 1 # '0': NONE, '1': PERFORMANCE, '2': QUALITY, '3': ULTRA, '4': NEURAL sensing_mode: 0 # '0': STANDARD, '1': FILL (not use FILL for robotic applications) depth_stabilization: 1 # `0`: disabled, `1`: enabled openni_depth_mode: false # 'false': 32bit float meters, 'true': 16bit uchar millimeters depth_downsample_factor: 0.5 # Resample factor for depth data matrices [0.01,1.0] The SDK works with native data sizes, but publishes rescaled matrices (depth map, point cloud, ...) pos_tracking: pos_tracking_enabled: true # True to enable positional tracking from start publish_tf: true # publish `odom -> base_link` TF publish_map_tf: false # publish `map -> odom` TF map_frame: 'map' # main frame odometry_frame: 'odom' # odometry frame area_memory_db_path: 'zed_area_memory.area' # file loaded when the node starts to restore the "known visual features" map. save_area_memory_db_on_exit: false # save the "known visual features" map when the node is correctly closed to the path indicated by `area_memory_db_path` area_memory: false # Enable to detect loop closure floor_alignment: false # Enable to automatically calculate camera/floor offset initial_base_pose: [0.0,0.0,0.0, 0.0,0.0,0.0] # Initial position of the `base_frame` -> [X, Y, Z, R, P, Y] init_odom_with_first_valid_pose: true # Enable to initialize the odometry with the first valid pose path_pub_rate: 4.0 # Camera trajectory publishing frequency path_max_count: -1 # use '-1' for unlimited path size two_d_mode: false # Force navigation on a plane. If true the Z value will be fixed to "fixed_z_value", roll and pitch to zero fixed_z_value: 0.00 # Value to be used for Z coordinate if `two_d_mode` is true mapping: mapping_enabled: false # True to enable mapping and fused point cloud publication resolution: 0.05 # maps resolution in meters [0.01f, 0.2f] max_mapping_range: -1 # maximum depth range while mapping in meters (-1 for automatic calculation) [2.0, 20.0] fused_pointcloud_freq: 1.0 # frequency of the publishing of the fused colored point cloud ```And here is the zed2.yaml param file
```yaml # params/zed2.yaml # Parameters for Stereolabs ZED2 camera --- general: camera_model: 'zed2' depth: min_depth: 0.7 # Min: 0.2, Max: 3.0 - Default 0.7 - Note: reducing this value wil require more computational power and GPU memory max_depth: 5.0 # Max: 40.0 pos_tracking: imu_fusion: true # enable/disable IMU fusion. When set to false, only the optical odometry will be used. sensors: sensors_timestamp_sync: false # Synchronize Sensors messages timestamp with latest received frame max_pub_rate: 200. # max frequency of publishing of sensors data. MAX: 400. - MIN: grab rate publish_imu_tf: false # publish `IMU ->Expected Result
I'm not sure what my expectations should be, but I wish that RGB and depth topics would publish at least 10Hz, and odom at least 5Hz?
Actual Result
Here are the logs I get:
``` INFO] [1651742955.302469952]: ********** Starting nodelet '/zed2_node' ********** [ INFO] [1651742955.302752098]: SDK version : 3.7.2 [ INFO] [1651742955.303057189]: *** GENERAL PARAMETERS *** [ INFO] [1651742955.305883681]: * Camera Name -> base_zed2 [ INFO] [1651742955.308708445]: * Camera Resolution -> HD720 [ WARN] [1651742955.312050623]: Wrong FrameRate (10) for the resolution HD720. Set to 15 FPS. [ INFO] [1651742955.312522627]: * Camera Grab Framerate -> 15 [ INFO] [1651742955.315686115]: * Gpu ID -> -1 [ INFO] [1651742955.319995469]: * Camera ID -> -1 [ INFO] [1651742955.323088972]: * Verbose -> DISABLED [ INFO] [1651742955.328147454]: * Camera Flip -> DISABLED [ INFO] [1651742955.333530099]: * Self calibration -> ENABLED [ INFO] [1651742955.338424292]: * Camera Model by param -> zed2 [ INFO] [1651742955.339081418]: *** VIDEO PARAMETERS *** [ INFO] [1651742955.341890406]: * Image resample factor -> 0.5 [ INFO] [1651742955.344950468]: * Extrinsic param. frame -> X RIGHT - Y DOWN - Z FWD [ INFO] [1651742955.345077222]: *** DEPTH PARAMETERS *** [ INFO] [1651742955.347423133]: * Depth quality -> PERFORMANCE [ INFO] [1651742955.350298489]: * Depth Sensing mode -> STANDARD [ INFO] [1651742955.352732978]: * OpenNI mode -> DISABLED [ INFO] [1651742955.355476109]: * Depth Stabilization -> ENABLED [ INFO] [1651742955.357936869]: * Minimum depth -> 0.7 m [ INFO] [1651742955.361663690]: * Maximum depth -> 5 m [ INFO] [1651742955.364145507]: * Depth resample factor -> 0.5 [ INFO] [1651742955.364316228]: *** POSITIONAL TRACKING PARAMETERS *** [ INFO] [1651742955.369812539]: * Positional tracking -> ENABLED [ INFO] [1651742955.372637367]: * Path rate -> 4 Hz [ INFO] [1651742955.375155696]: * Path history size -> 1 [ INFO] [1651742955.380056032]: * Odometry DB path -> /root/.ros/zed_area_memory.area [ INFO] [1651742955.384380043]: * Save Area Memory on closing -> DISABLED [ INFO] [1651742955.389313468]: * Area Memory -> DISABLED [ INFO] [1651742955.395014004]: * IMU Fusion -> ENABLED [ INFO] [1651742955.400556683]: * Floor alignment -> DISABLED [ INFO] [1651742955.405488988]: * Init Odometry with first valid pose data -> ENABLED [ INFO] [1651742955.410190187]: * Two D mode -> DISABLED [ INFO] [1651742955.415038971]: *** MAPPING PARAMETERS *** [ INFO] [1651742955.419934411]: * Mapping -> DISABLED [ INFO] [1651742955.422389027]: * Clicked point topic -> /clicked_point [ INFO] [1651742955.422550949]: *** OBJECT DETECTION PARAMETERS *** [ INFO] [1651742955.427019857]: * Object Detection -> DISABLED [ INFO] [1651742955.427197491]: *** SENSORS PARAMETERS *** [ INFO] [1651742955.429690060]: * Sensors timestamp sync -> DISABLED [ INFO] [1651742955.432780106]: * Max sensors rate -> 200 [ INFO] [1651742955.432975628]: *** SVO PARAMETERS *** [ INFO] [1651742955.437743036]: * SVO input file: -> [ INFO] [1651742955.445452008]: * SVO REC compression -> H265 (HEVC) [ INFO] [1651742955.448093698]: *** COORDINATE FRAMES *** [ INFO] [1651742955.461940779]: * map_frame -> map [ INFO] [1651742955.462157421]: * odometry_frame -> odom [ INFO] [1651742955.462295215]: * base_frame -> base_zed2_base_link [ INFO] [1651742955.462407952]: * camera_frame -> base_zed2_camera_center [ INFO] [1651742955.462553105]: * imu_link -> base_zed2_imu_link [ INFO] [1651742955.462707251]: * left_camera_frame -> base_zed2_left_camera_frame [ INFO] [1651742955.462856980]: * left_camera_optical_frame -> base_zed2_left_camera_optical_frame [ INFO] [1651742955.462957781]: * right_camera_frame -> base_zed2_right_camera_frame [ INFO] [1651742955.463083671]: * right_camera_optical_frame -> base_zed2_right_camera_optical_frame [ INFO] [1651742955.463209496]: * depth_frame -> base_zed2_left_camera_frame [ INFO] [1651742955.463307897]: * depth_optical_frame -> base_zed2_left_camera_optical_frame [ INFO] [1651742955.463432666]: * disparity_frame -> base_zed2_left_camera_frame [ INFO] [1651742955.463581595]: * disparity_optical_frame -> base_zed2_left_camera_optical_frame [ INFO] [1651742955.463830430]: * confidence_frame -> base_zed2_left_camera_frame [ INFO] [1651742955.463942623]: * confidence_optical_frame -> base_zed2_left_camera_optical_frame [ INFO] [1651742955.475247279]: * Broadcast odometry TF -> ENABLED [ INFO] [1651742955.487308102]: * Broadcast map pose TF -> DISABLED [ INFO] [1651742955.498681591]: * Broadcast IMU pose TF -> DISABLED [ INFO] [1651742955.499072027]: *** DYNAMIC PARAMETERS (Init. values) *** [ INFO] [1651742955.501861111]: * [DYN] Depth confidence -> 30 [ INFO] [1651742955.503953195]: * [DYN] Depth texture conf. -> 100 [ INFO] [1651742955.506333859]: * [DYN] pub_frame_rate -> 10 Hz [ INFO] [1651742955.508783419]: * [DYN] point_cloud_freq -> 5 Hz [ INFO] [1651742955.511351893]: * [DYN] brightness -> 4 [ INFO] [1651742955.514046575]: * [DYN] contrast -> 4 [ INFO] [1651742955.519661191]: * [DYN] hue -> 0 [ INFO] [1651742955.522029406]: * [DYN] saturation -> 4 [ INFO] [1651742955.524731513]: * [DYN] sharpness -> 4 [ INFO] [1651742955.527522293]: * [DYN] gamma -> 8 [ INFO] [1651742955.535939208]: * [DYN] auto_exposure_gain -> ENABLED [ INFO] [1651742955.544873281]: * [DYN] auto_whitebalance -> ENABLED [ INFO] [1651742955.591778513]: * Camera coordinate system -> Right HANDED Z UP and X FORWARD [ INFO] [1651742955.592898652]: *** Opening ZED 2... [INFO] [1651742956.104102]: Joystick over IP server socket created [INFO] [1651742956.110497]: Attempting connection to 10.0.3.9:13337 [INFO] [1651742956.207649]: Socket connected to:10.0.3.9:13337 [INFO] [1651742956.222345]: Subscribed to /cmd_vel [ INFO] [1651742958.484059770]: ZED connection -> SUCCESS [ INFO] [1651742960.486213978]: ... ZED ready [ INFO] [1651742960.486985058]: ZED SDK running on GPU #0 [ INFO] [1651742960.504168395]: Camera-IMU Transform: 55A081ECC8 0.999961 0.008006 -0.003773 -0.002000 -0.008025 0.999955 -0.005152 -0.023000 0.003732 0.005182 0.999980 0.000220 0.000000 0.000000 0.000000 1.000000 [ INFO] [1651742960.505880828]: * CAMERA MODEL -> ZED 2 [ INFO] [1651742960.506569795]: * Serial Number -> 20843768 [ INFO] [1651742960.508728728]: * Camera FW Version -> 1523 [ INFO] [1651742960.509987397]: * Sensors FW Version -> 778 [ INFO] [1651742960.854295051]: Advertised on topic /zed2_node/rgb/image_rect_color [ INFO] [1651742960.854506733]: Advertised on topic /zed2_node/rgb/camera_info [ INFO] [1651742960.864197933]: Advertised on topic /zed2_node/rgb_raw/image_raw_color [ INFO] [1651742960.864413615]: Advertised on topic /zed2_node/rgb_raw/camera_info [ INFO] [1651742960.882351840]: Advertised on topic /zed2_node/left/image_rect_color [ INFO] [1651742960.882821765]: Advertised on topic /zed2_node/left/camera_info [ INFO] [1651742960.894232469]: Advertised on topic /zed2_node/left_raw/image_raw_color [ INFO] [1651742960.894410679]: Advertised on topic /zed2_node/left_raw/camera_info [ INFO] [1651742960.910184499]: Advertised on topic /zed2_node/right/image_rect_color [ INFO] [1651742960.910643703]: Advertised on topic /zed2_node/right/camera_info [ INFO] [1651742960.918788360]: Advertised on topic /zed2_node/right_raw/image_raw_color [ INFO] [1651742960.918988682]: Advertised on topic /zed2_node/right_raw/camera_info [ INFO] [1651742960.924812515]: Advertised on topic /zed2_node/rgb/image_rect_gray [ INFO] [1651742960.924986373]: Advertised on topic /zed2_node/rgb/camera_info [ INFO] [1651742960.934915655]: Advertised on topic /zed2_node/rgb_raw/image_raw_gray [ INFO] [1651742960.935266890]: Advertised on topic /zed2_node/rgb_raw/camera_info [ INFO] [1651742960.944659687]: Advertised on topic /zed2_node/left/image_rect_gray [ INFO] [1651742960.944795657]: Advertised on topic /zed2_node/left/camera_info [ INFO] [1651742960.950405216]: Advertised on topic /zed2_node/left_raw/image_raw_gray [ INFO] [1651742960.950603490]: Advertised on topic /zed2_node/left_raw/camera_info [ INFO] [1651742960.956158073]: Advertised on topic /zed2_node/right/image_rect_gray [ INFO] [1651742960.956351451]: Advertised on topic /zed2_node/right/camera_info [ INFO] [1651742960.961178890]: Advertised on topic /zed2_node/right_raw/image_raw_gray [ INFO] [1651742960.961512654]: Advertised on topic /zed2_node/right_raw/camera_info [ INFO] [1651742960.969653150]: Advertised on topic /zed2_node/depth/depth_registered [ INFO] [1651742960.969868640]: Advertised on topic /zed2_node/depth/camera_info [ INFO] [1651742960.975567672]: Advertised on topic /zed2_node/stereo/image_rect_color [ INFO] [1651742960.985023478]: Advertised on topic /zed2_node/stereo_raw/image_raw_color [ INFO] [1651742960.990864239]: Advertised on topic /zed2_node/confidence/confidence_map [ INFO] [1651742960.994125263]: Advertised on topic /zed2_node/disparity/disparity_image [ INFO] [1651742960.997082477]: Advertised on topic /zed2_node/point_cloud/cloud_registered [ INFO] [1651742961.000266092]: Advertised on topic /zed2_node/pose [ INFO] [1651742961.003470796]: Advertised on topic /zed2_node/pose_with_covariance [ INFO] [1651742961.011171096]: Advertised on topic /zed2_node/odom [ INFO] [1651742961.023317743]: Advertised on topic /zed2_node/path_odom [ INFO] [1651742961.032090982]: Advertised on topic /zed2_node/path_map [ INFO] [1651742961.036639091]: Advertised on topic /zed2_node/imu/data [ INFO] [1651742961.040024980]: Advertised on topic /zed2_node/imu/data_raw [ INFO] [1651742961.043254612]: Advertised on topic /zed2_node/imu/mag [ INFO] [1651742961.046253874]: Advertised on topic /zed2_node/temperature/imu [ INFO] [1651742961.049693876]: Advertised on topic /zed2_node/atm_press [ INFO] [1651742961.053190454]: Advertised on topic /zed2_node/temperature/left [ INFO] [1651742961.063104600]: Advertised on topic /zed2_node/temperature/right [ INFO] [1651742961.066726524]: Advertised on topic /zed2_node/left_cam_imu_transform [LATCHED] [ INFO] [1651742961.084766862]: Subscribed to topic /clicked_point [ INFO] [1651742961.135337504]: *** Starting Positional Tracking *** [ INFO] [1651742961.135568707]: * Waiting for valid static transformations... [ WARN] [1651742971.624700659]: !!! Failed to get static transforms. Is the 'ROBOT STATE PUBLISHER' node correctly working? [ INFO] [1651742971.625896063]: Initial ZED left camera pose (ZED pos. tracking): [ INFO] [1651742971.627253388]: * T: [0,0,0] [ INFO] [1651742971.627821426]: * Q: [0,0,0,1] [ WARN] [1651742971.631351636]: area_memory_db_path [/root/.ros/zed_area_memory.area] doesn't exist or is unreachable. [ INFO] [1651742972.514228955]: Positional tracking -> OK [OK] [ INFO] [1651742972.515014851]: Odometry aligned to last tracking pose [ WARN] [1651742975.723410743]: Elaboration takes longer (0.321752 sec) than requested by the FPS rate (0.066666667 sec). Please consider to lower the 'frame_rate' setting or to reduce the power requirements reducing the resolutions. [ INFO] [1651742975.847705813]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742975.848386876]: Expected cycle time: 0.005000000 - Real cycle time: 0.301739588 [ WARN] [1651742975.849007266]: Sensors data publishing takes longer (0.301739588 sec) than requested by the Sensors rate (0.005000000 sec). Please consider to lower the 'max_pub_rate' setting or to reduce the power requirements reducing the resolutions. [ INFO] [1651742977.059047595]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742977.059281133]: Expected cycle time: 0.005000000 - Real cycle time: 0.301870979 [ INFO] [1651742978.269889394]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742978.270140885]: Expected cycle time: 0.005000000 - Real cycle time: 0.302702856 [ INFO] [1651742979.480074058]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742979.480308300]: Expected cycle time: 0.005000000 - Real cycle time: 0.302582277 [ INFO] [1651742980.690090358]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742980.690326457]: Expected cycle time: 0.005000000 - Real cycle time: 0.303270410 [ INFO] [1651742981.897616930]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742981.897891173]: Expected cycle time: 0.005000000 - Real cycle time: 0.301985051 [ INFO] [1651742983.106206447]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742983.107008951]: Expected cycle time: 0.005000000 - Real cycle time: 0.301372147 [ INFO] [1651742984.319014587]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742984.320093189]: Expected cycle time: 0.005000000 - Real cycle time: 0.303072737 [ INFO] [1651742985.531379674]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742985.531591580]: Expected cycle time: 0.005000000 - Real cycle time: 0.302000660 [ WARN] [1651742985.901780230]: Elaboration takes longer (0.318354 sec) than requested by the FPS rate (0.066666667 sec). Please consider to lower the 'frame_rate' setting or to reduce the power requirements reducing the resolutions. [ WARN] [1651742986.136130953]: Sensors data publishing takes longer (0.302236565 sec) than requested by the Sensors rate (0.005000000 sec). Please consider to lower the 'max_pub_rate' setting or to reduce the power requirements reducing the resolutions. [ INFO] [1651742986.741585851]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742986.742380323]: Expected cycle time: 0.005000000 - Real cycle time: 0.302581528 [ INFO] [1651742987.953472036]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742987.954196171]: Expected cycle time: 0.005000000 - Real cycle time: 0.301540268 [ INFO] [1651742989.164765022]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742989.165008288]: Expected cycle time: 0.005000000 - Real cycle time: 0.302564051 [ INFO] [1651742990.376142831]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742990.376386257]: Expected cycle time: 0.005000000 - Real cycle time: 0.302417615 [ INFO] [1651742991.589072775]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742991.589410250]: Expected cycle time: 0.005000000 - Real cycle time: 0.303142132 [ INFO] [1651742992.801928949]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742992.802121463]: Expected cycle time: 0.005000000 - Real cycle time: 0.301846309 [ INFO] [1651742994.011029079]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742994.011476699]: Expected cycle time: 0.005000000 - Real cycle time: 0.301466400 [ INFO] [1651742995.222950250]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742995.223627025]: Expected cycle time: 0.005000000 - Real cycle time: 0.302276005 [ WARN] [1651742996.077340286]: Elaboration takes longer (0.3176 sec) than requested by the FPS rate (0.066666667 sec). Please consider to lower the 'frame_rate' setting or to reduce the power requirements reducing the resolutions. [ INFO] [1651742996.436211906]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742996.436897577]: Expected cycle time: 0.005000000 - Real cycle time: 0.303155179 [ WARN] [1651742996.437202092]: Sensors data publishing takes longer (0.303155179 sec) than requested by the Sensors rate (0.005000000 sec). Please consider to lower the 'max_pub_rate' setting or to reduce the power requirements reducing the resolutions. [ INFO] [1651742997.645615628]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742997.645896751]: Expected cycle time: 0.005000000 - Real cycle time: 0.302025790 [ INFO] [1651742998.856181369]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651742998.857478054]: Expected cycle time: 0.005000000 - Real cycle time: 0.302615170 [ INFO] [1651743000.065413489]: Sensors thread is not synchronized with the Sensors rate [ INFO] [1651743000.066732158]: Expected cycle time: 0.005000000 - Real cycle time: 0.302426974 ```ZED Camera model
ZED2
Environment
Anything else?
Apart from that, the ZED2 is a great camera :smile:
Thank you for your help!