Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] No data published to any topic, ZED2 in Docker #748

Closed
XDGFX opened this issue Jul 13, 2021 · 6 comments
Closed

[Question] No data published to any topic, ZED2 in Docker #748

XDGFX opened this issue Jul 13, 2021 · 6 comments
Assignees
Labels

Comments

@XDGFX
Copy link

XDGFX commented Jul 13, 2021

I'm having trouble setting up a ZED 2 camera.

Running on a Jetson Xavier NX (Ubuntu 18.04, L4T 32.5.0). I've set up a Docker container for the 3.5 SDK and wrapper (although for reference, the same issue is happening with the provided 3.4-ros-devel-jetson-jp4.3 image).

The ROS master is running on the host, and the container is using bridge networking. Therefore, I set the environment variable ROS_MASTER_URI=http://172.17.0.1:11311. I can start the wrapper using roslaunch zed_wrapper zed2.launch, and topics appear on the host as expected.

However I cannot get any data from the topics, they all appear empty. I've tried opening rviz with the zed2 config provided in the examples repo. I've also tried echoing various topics, and using image_view to show a raw image (rosrun image_view image_view image:/zed2/zed_node/right/image_raw_color).

Hopefully this is just a simple config issue, help is much appreciated!

For reference, the startup appears fine, shown below:

root@b5fffc1e3fc1:/opt/ros_ws# roslaunch zed_wrapper zed2.launch 
... logging to /root/.ros/log/bb1844bc-e3be-11eb-a859-48b02d0788d9/roslaunch-b5fffc1e3fc1-187.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://b5fffc1e3fc1:45665/

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.10
 * /zed2/zed2_description: <?xml version="1....
 * /zed2/zed_node/auto_exposure_gain: True
 * /zed2/zed_node/auto_whitebalance: True
 * /zed2/zed_node/brightness: 4
 * /zed2/zed_node/contrast: 4
 * /zed2/zed_node/depth/depth_downsample_factor: 1.0
 * /zed2/zed_node/depth/depth_stabilization: 1
 * /zed2/zed_node/depth/max_depth: 20.0
 * /zed2/zed_node/depth/min_depth: 0.7
 * /zed2/zed_node/depth/openni_depth_mode: False
 * /zed2/zed_node/depth/quality: 1
 * /zed2/zed_node/depth/sensing_mode: 0
 * /zed2/zed_node/depth_confidence: 50
 * /zed2/zed_node/depth_texture_conf: 100
 * /zed2/zed_node/exposure: 100
 * /zed2/zed_node/gain: 100
 * /zed2/zed_node/gamma: 8
 * /zed2/zed_node/general/base_frame: base_link
 * /zed2/zed_node/general/camera_flip: False
 * /zed2/zed_node/general/camera_model: zed2
 * /zed2/zed_node/general/camera_name: zed2
 * /zed2/zed_node/general/gpu_id: -1
 * /zed2/zed_node/general/grab_frame_rate: 30
 * /zed2/zed_node/general/resolution: 2
 * /zed2/zed_node/general/self_calib: True
 * /zed2/zed_node/general/serial_number: 0
 * /zed2/zed_node/general/svo_compression: 2
 * /zed2/zed_node/general/verbose: False
 * /zed2/zed_node/general/zed_id: 0
 * /zed2/zed_node/hue: 0
 * /zed2/zed_node/mapping/fused_pointcloud_freq: 1.0
 * /zed2/zed_node/mapping/mapping_enabled: False
 * /zed2/zed_node/mapping/max_mapping_range: -1
 * /zed2/zed_node/mapping/resolution: 0.05
 * /zed2/zed_node/object_detection/confidence_threshold: 50
 * /zed2/zed_node/object_detection/object_tracking_enabled: True
 * /zed2/zed_node/object_detection/od_enabled: False
 * /zed2/zed_node/object_detection/people_detection: True
 * /zed2/zed_node/object_detection/vehicle_detection: False
 * /zed2/zed_node/point_cloud_freq: 15.0
 * /zed2/zed_node/pos_tracking/area_memory: True
 * /zed2/zed_node/pos_tracking/area_memory_db_path: 
 * /zed2/zed_node/pos_tracking/fixed_z_value: 0.0
 * /zed2/zed_node/pos_tracking/floor_alignment: False
 * /zed2/zed_node/pos_tracking/imu_fusion: True
 * /zed2/zed_node/pos_tracking/init_odom_with_first_valid_pose: True
 * /zed2/zed_node/pos_tracking/initial_base_pose: [0.0, 0.0, 0.0, 0...
 * /zed2/zed_node/pos_tracking/map_frame: map
 * /zed2/zed_node/pos_tracking/odometry_frame: odom
 * /zed2/zed_node/pos_tracking/path_max_count: -1
 * /zed2/zed_node/pos_tracking/path_pub_rate: 2.0
 * /zed2/zed_node/pos_tracking/publish_map_tf: True
 * /zed2/zed_node/pos_tracking/publish_tf: True
 * /zed2/zed_node/pos_tracking/two_d_mode: False
 * /zed2/zed_node/pub_frame_rate: 15.0
 * /zed2/zed_node/saturation: 4
 * /zed2/zed_node/sensors/publish_imu_tf: True
 * /zed2/zed_node/sensors/sensors_timestamp_sync: False
 * /zed2/zed_node/sharpness: 4
 * /zed2/zed_node/stream: 
 * /zed2/zed_node/svo_file: 
 * /zed2/zed_node/video/extrinsic_in_camera_frame: True
 * /zed2/zed_node/video/img_downsample_factor: 1.0
 * /zed2/zed_node/whitebalance_temperature: 42

NODES
  /zed2/
    zed2_state_publisher (robot_state_publisher/robot_state_publisher)
    zed_node (zed_wrapper/zed_wrapper_node)

ROS_MASTER_URI=http://172.17.0.1:11311

process[zed2/zed2_state_publisher-1]: started with pid [199]
process[zed2/zed_node-2]: started with pid [200]
[ INFO] [1626170257.907953483]: Initializing nodelet with 6 worker threads.
[ INFO] [1626170258.019139096]: ********** Starting nodelet '/zed2/zed_node' **********
[ INFO] [1626170258.019423517]: SDK version : 3.4.0
[ INFO] [1626170258.019622305]: *** PARAMETERS ***
[ INFO] [1626170258.023433122]:  * Camera Name                  -> zed2
[ INFO] [1626170258.026017294]:  * Camera Resolution            -> HD720
[ INFO] [1626170258.028340918]:  * Camera Grab Framerate        -> 30
[ INFO] [1626170258.030903137]:  * Gpu ID                       -> -1
[ INFO] [1626170258.033219113]:  * Camera ID                    -> -1
[ INFO] [1626170258.035642802]:  * Verbose                      -> DISABLED
[ INFO] [1626170258.040019229]:  * Camera Flip                  -> DISABLED
[ INFO] [1626170258.044466409]:  * Self calibration             -> ENABLED
[ INFO] [1626170258.049066264]:  * Camera Model by param        -> zed2
[ INFO] [1626170258.051249181]:  * Image resample factor        -> 1
[ INFO] [1626170258.053544292]:  * Extrinsic param. frame       -> X RIGHT - Y DOWN - Z FWD
[ INFO] [1626170258.055793611]:  * Depth quality                -> PERFORMANCE
[ INFO] [1626170258.060702367]:  * Depth Sensing mode           -> STANDARD
[ INFO] [1626170258.064661058]:  * OpenNI mode                  -> DISABLED
[ INFO] [1626170258.067382929]:  * Depth Stabilization          -> ENABLED
[ INFO] [1626170258.069853179]:  * Minimum depth                -> 0.7 m
[ INFO] [1626170258.072196931]:  * Maximum depth                -> 20 m
[ INFO] [1626170258.074591020]:  * Depth resample factor        -> 1
[ INFO] [1626170258.076722608]:  * Path rate                    -> 2 Hz
[ INFO] [1626170258.079071897]:  * Path history size            -> 1
[ INFO] [1626170258.083220671]:  * Odometry DB path             -> 
[ INFO] [1626170258.087368166]:  * Spatial Memory               -> ENABLED
[ INFO] [1626170258.091175399]:  * IMU Fusion                   -> ENABLED
[ INFO] [1626170258.095513937]:  * Floor alignment              -> DISABLED
[ INFO] [1626170258.099967102]:  * Init Odometry with first valid pose data -> ENABLED
[ INFO] [1626170258.104004227]:  * Two D mode                   -> DISABLED
[ INFO] [1626170258.111961547]:  * Mapping                      -> DISABLED
[ INFO] [1626170258.116627802]:  * Object Detection             -> DISABLED
[ INFO] [1626170258.118862048]:  * Sensors timestamp sync       -> DISABLED
[ INFO] [1626170258.123641074]:  * SVO input file:              -> 
[ INFO] [1626170258.125965818]:  * SVO REC compression          -> H265 (HEVC)
[ INFO] [1626170258.143087742]:  * map_frame                    -> map
[ INFO] [1626170258.143306274]:  * odometry_frame               -> odom
[ INFO] [1626170258.143425220]:  * base_frame                   -> base_link
[ INFO] [1626170258.143536166]:  * camera_frame                 -> zed2_camera_center
[ INFO] [1626170258.143634344]:  * imu_link                     -> zed2_imu_link
[ INFO] [1626170258.143740458]:  * left_camera_frame            -> zed2_left_camera_frame
[ INFO] [1626170258.143910829]:  * left_camera_optical_frame    -> zed2_left_camera_optical_frame
[ INFO] [1626170258.144032175]:  * right_camera_frame           -> zed2_right_camera_frame
[ INFO] [1626170258.144128528]:  * right_camera_optical_frame   -> zed2_right_camera_optical_frame
[ INFO] [1626170258.144215154]:  * depth_frame                  -> zed2_left_camera_frame
[ INFO] [1626170258.144315827]:  * depth_optical_frame          -> zed2_left_camera_optical_frame
[ INFO] [1626170258.144415093]:  * disparity_frame              -> zed2_left_camera_frame
[ INFO] [1626170258.144539223]:  * disparity_optical_frame      -> zed2_left_camera_optical_frame
[ INFO] [1626170258.144704858]:  * confidence_frame             -> zed2_left_camera_frame
[ INFO] [1626170258.144809244]:  * confidence_optical_frame     -> zed2_left_camera_optical_frame
[ INFO] [1626170258.149949044]:  * Broadcast odometry TF        -> ENABLED
[ INFO] [1626170258.154701733]:  * Broadcast map pose TF        -> ENABLED
[ INFO] [1626170258.159436790]:  * Broadcast IMU pose TF        -> ENABLED
[ INFO] [1626170258.161816159]:  * [DYN] Depth confidence       -> 50
[ INFO] [1626170258.164875219]:  * [DYN] Depth texture conf.    -> 100
[ INFO] [1626170258.167285660]:  * [DYN] pub_frame_rate         -> 15 Hz
[ INFO] [1626170258.169693061]:  * [DYN] point_cloud_freq       -> 15 Hz
[ INFO] [1626170258.172334610]:  * [DYN] brightness             -> 4
[ INFO] [1626170258.174913118]:  * [DYN] contrast               -> 4
[ INFO] [1626170258.177424169]:  * [DYN] hue                    -> 0
[ INFO] [1626170258.180221913]:  * [DYN] saturation             -> 4
[ INFO] [1626170258.183515665]:  * [DYN] sharpness              -> 4
[ INFO] [1626170258.186057949]:  * [DYN] gamma                  -> 8
[ INFO] [1626170258.188279075]:  * [DYN] auto_exposure_gain     -> ENABLED
[ INFO] [1626170258.196056264]:  * [DYN] auto_whitebalance      -> ENABLED
[ INFO] [1626170258.230523605]:  * Camera coordinate system     -> Right HANDED Z UP and X FORWARD
[ INFO] [1626170258.230811034]:  *** Opening ZED 2...
[ZED][Init] No calibration file found for SN#########. Downloading... 
[ZED][Init] Calibration file downloaded.
[ INFO] [1626170260.605585037]: ZED connection -> SUCCESS
[ INFO] [1626170262.606255494]:  ...  ZED ready
[ INFO] [1626170262.606923057]: ZED SDK running on GPU #0
[ INFO] [1626170262.618019342]: Camera-IMU Transform: 
 55941670B0
0.999991 0.003512 -0.002317 -0.002000
-0.003519 0.999990 -0.002758 -0.023000
0.002308 0.002766 0.999994 -0.002000
0.000000 0.000000 0.000000 1.000000

[ INFO] [1626170262.618730266]:  * CAMERA MODEL  -> ZED 2
[ INFO] [1626170262.619190594]:  * Serial Number -> #########
[ INFO] [1626170262.619551368]:  * Camera FW Version -> 1523
[ INFO] [1626170262.619767564]:  * Sensors FW Version -> 776
[ INFO] [1626170263.576856682]: Advertised on topic /zed2/zed_node/rgb/image_rect_color
[ INFO] [1626170263.577108975]: Advertised on topic /zed2/zed_node/rgb/camera_info
[ INFO] [1626170263.697968411]: Advertised on topic /zed2/zed_node/rgb_raw/image_raw_color
[ INFO] [1626170263.698192095]: Advertised on topic /zed2/zed_node/rgb_raw/camera_info
[ INFO] [1626170263.822818315]: Advertised on topic /zed2/zed_node/left/image_rect_color
[ INFO] [1626170263.823236114]: Advertised on topic /zed2/zed_node/left/camera_info
[ INFO] [1626170263.956556467]: Advertised on topic /zed2/zed_node/left_raw/image_raw_color
[ INFO] [1626170263.956815383]: Advertised on topic /zed2/zed_node/left_raw/camera_info
[ INFO] [1626170264.085189059]: Advertised on topic /zed2/zed_node/right/image_rect_color
[ INFO] [1626170264.085523369]: Advertised on topic /zed2/zed_node/right/camera_info
[ INFO] [1626170264.218576228]: Advertised on topic /zed2/zed_node/right_raw/image_raw_color
[ INFO] [1626170264.218817352]: Advertised on topic /zed2/zed_node/right_raw/camera_info
[ INFO] [1626170264.341557459]: Advertised on topic /zed2/zed_node/rgb/image_rect_gray
[ INFO] [1626170264.341811127]: Advertised on topic /zed2/zed_node/rgb/camera_info
[ INFO] [1626170264.465791448]: Advertised on topic /zed2/zed_node/rgb_raw/image_raw_gray
[ INFO] [1626170264.466092957]: Advertised on topic /zed2/zed_node/rgb_raw/camera_info
[ INFO] [1626170264.590367234]: Advertised on topic /zed2/zed_node/left/image_rect_gray
[ INFO] [1626170264.590775977]: Advertised on topic /zed2/zed_node/left/camera_info
[ INFO] [1626170264.715432821]: Advertised on topic /zed2/zed_node/left_raw/image_raw_gray
[ INFO] [1626170264.715868541]: Advertised on topic /zed2/zed_node/left_raw/camera_info
[ INFO] [1626170264.837172368]: Advertised on topic /zed2/zed_node/right/image_rect_gray
[ INFO] [1626170264.837587191]: Advertised on topic /zed2/zed_node/right/camera_info
[ INFO] [1626170264.969722850]: Advertised on topic /zed2/zed_node/right_raw/image_raw_gray
[ INFO] [1626170264.969932390]: Advertised on topic /zed2/zed_node/right_raw/camera_info
[ INFO] [1626170265.095583522]: Advertised on topic /zed2/zed_node/depth/depth_registered
[ INFO] [1626170265.095822150]: Advertised on topic /zed2/zed_node/depth/camera_info
[ INFO] [1626170265.219021144]: Advertised on topic /zed2/zed_node/stereo/image_rect_color
[ INFO] [1626170265.341065046]: Advertised on topic /zed2/zed_node/stereo_raw/image_raw_color
[ INFO] [1626170265.344239724]: Advertised on topic /zed2/zed_node/confidence/confidence_map
[ INFO] [1626170265.348086830]: Advertised on topic /zed2/zed_node/disparity/disparity_image
[ INFO] [1626170265.352174963]: Advertised on topic /zed2/zed_node/point_cloud/cloud_registered
[ INFO] [1626170265.356636799]: Advertised on topic /zed2/zed_node/pose
[ INFO] [1626170265.360876872]: Advertised on topic /zed2/zed_node/pose_with_covariance
[ INFO] [1626170265.364338562]: Advertised on topic /zed2/zed_node/odom
[ INFO] [1626170265.368295590]: Advertised on topic /zed2/zed_node/path_odom
[ INFO] [1626170265.372292170]: Advertised on topic /zed2/zed_node/path_map
[ INFO] [1626170265.375921352]: Advertised on topic /zed2/zed_node/imu/data
[ INFO] [1626170265.378917851]: Advertised on topic /zed2/zed_node/imu/data_raw
[ INFO] [1626170265.382444471]: Advertised on topic /zed2/zed_node/imu/mag
[ INFO] [1626170265.386090325]: Advertised on topic /zed2/zed_node/temperature/imu
[ INFO] [1626170265.389610801]: Advertised on topic /zed2/zed_node/atm_press
[ INFO] [1626170265.392938538]: Advertised on topic /zed2/zed_node/temperature/left
[ INFO] [1626170265.396099391]: Advertised on topic /zed2/zed_node/temperature/right
[ INFO] [1626170265.399623931]: Advertised on topic /zed2/zed_node/left_cam_imu_transform [LATCHED]
@Myzhar
Copy link
Member

Myzhar commented Jul 13, 2021

Hi @XDGFX
are the topics empty inside or outside the container?

@XDGFX
Copy link
Author

XDGFX commented Jul 13, 2021

Bah, I can't believe I didn't check that. Topics are populated inside the container (tested with /zed2/zed_node/temperature/imu), but the same topic shows nothing outside the container.

Seems like a Docker networking issue. I'm more familiar with ROS2 and Docker networking so I've likely missed something here.

@Myzhar
Copy link
Member

Myzhar commented Jul 13, 2021

Check that all the ports used by ROS are opened:
http://wiki.ros.org/Security

@XDGFX
Copy link
Author

XDGFX commented Jul 13, 2021

Got it working 👍.

As ROS1 seems to need a lot of ports open I've set the networking to host (network_mode: host in docker-compose, alternatively the flag --net=host), and that seems to have fixed it.

Many thanks for the nearly instant help :)

@XDGFX XDGFX closed this as completed Jul 13, 2021
@Leovilhena
Copy link

@XDGFX would it be possible for you to share the Dockerfile for ZED2?
I've been struggling to write a working one and any help would be really appreciated.

Cheers

@XDGFX
Copy link
Author

XDGFX commented Sep 7, 2021

@Leovilhena The Dockerfile I'm using is here 😄
stereolabs/zed-ros2-wrapper#48 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

3 participants