stereolabs / zed-ros-wrapper

ROS wrapper for the ZED SDK
https://www.stereolabs.com/docs/ros/
MIT License
447 stars 391 forks source link

Where can i find what gpu is selected when running #510

Closed Codeguyross closed 4 years ago

Codeguyross commented 4 years ago

Sorry for the question if I am in the wrong place. I am very new to both zed and ros. I am trying to figure out how to know exactly what GPU is selected by "gpu_id = -1" in camera config file. If it helps, here is what I see when I launch an example below. Note the line that reads "/zed/zed_node/general/gpu_id: -1". What are my options? is -1 the only option?

SUMMARY
========

PARAMETERS
 * /rosdistro: melodic
 * /rosversion: 1.14.3
 * /zed/zed_description: <?xml version="1....
 * /zed/zed_node/auto_exposure_gain: True
 * /zed/zed_node/auto_whitebalance: True
 * /zed/zed_node/brightness: 4
 * /zed/zed_node/confidence: 97
 * /zed/zed_node/contrast: 4
 * /zed/zed_node/depth/depth_stabilization: 1
 * /zed/zed_node/depth/max_depth: 10.0
 * /zed/zed_node/depth/min_depth: 0.7
 * /zed/zed_node/depth/openni_depth_mode: 0
 * /zed/zed_node/depth/quality: 4
 * /zed/zed_node/depth/sensing_mode: 0
 * /zed/zed_node/exposure: 100
 * /zed/zed_node/gain: 100
 * /zed/zed_node/general/base_frame: base_link
 * /zed/zed_node/general/camera_flip: False
 * /zed/zed_node/general/camera_frame: zed_camera_center
 * /zed/zed_node/general/camera_model: zed
 * /zed/zed_node/general/frame_rate: 15
 * /zed/zed_node/general/gpu_id: -1
 * /zed/zed_node/general/left_camera_frame: zed_left_camera_f...
 * /zed/zed_node/general/left_camera_optical_frame: zed_left_camera_o...
 * /zed/zed_node/general/resolution: 1
 * /zed/zed_node/general/right_camera_frame: zed_right_camera_...
 * /zed/zed_node/general/right_camera_optical_frame: zed_right_camera_...
 * /zed/zed_node/general/self_calib: True
 * /zed/zed_node/general/serial_number: 0
 * /zed/zed_node/general/svo_compression: 2
 * /zed/zed_node/general/verbose: True
 * /zed/zed_node/general/zed_id: 0
 * /zed/zed_node/hue: 0
 * /zed/zed_node/mapping/fused_pointcloud_freq: 1.0
 * /zed/zed_node/mapping/mapping_enabled: False
 * /zed/zed_node/mapping/resolution: 0
 * /zed/zed_node/mat_resize_factor: 1.0
 * /zed/zed_node/point_cloud_freq: 5.0
 * /zed/zed_node/pos_tracking/fixed_cov_value: 1e-6
 * /zed/zed_node/pos_tracking/fixed_covariance: False
 * /zed/zed_node/pos_tracking/fixed_z_value: 0.0
 * /zed/zed_node/pos_tracking/floor_alignment: False
 * /zed/zed_node/pos_tracking/init_odom_with_first_valid_pose: True
 * /zed/zed_node/pos_tracking/initial_base_pose: [0.0, 0.0, 0.0, 0...
 * /zed/zed_node/pos_tracking/map_frame: map
 * /zed/zed_node/pos_tracking/odometry_db: 
 * /zed/zed_node/pos_tracking/odometry_frame: odom
 * /zed/zed_node/pos_tracking/path_max_count: -1
 * /zed/zed_node/pos_tracking/path_pub_rate: 2.0
 * /zed/zed_node/pos_tracking/publish_map_tf: False
 * /zed/zed_node/pos_tracking/publish_pose_covariance: True
 * /zed/zed_node/pos_tracking/publish_tf: True
 * /zed/zed_node/pos_tracking/spatial_memory: True
 * /zed/zed_node/pos_tracking/two_d_mode: False
 * /zed/zed_node/pos_tracking/world_frame: map
 * /zed/zed_node/saturation: 4
 * /zed/zed_node/sharpness: 3
 * /zed/zed_node/stream: 
 * /zed/zed_node/svo_file: 
 * /zed/zed_node/video/color_enhancement: True
 * /zed/zed_node/whitebalance_temperature: 4200

NODES
  /
    rviz (rviz/rviz)
  /zed/
    zed_node (zed_wrapper/zed_wrapper_node)
    zed_state_publisher (robot_state_publisher/robot_state_publisher)

auto-starting new master
process[master]: started with pid [26690]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 7085e0f8-42de-11ea-ab96-20791823fa0a
process[rosout-1]: started with pid [26701]
started core service [/rosout]
process[zed/zed_state_publisher-2]: started with pid [26708]
process[zed/zed_node-3]: started with pid [26709]
process[rviz-4]: started with pid [26714]
[ INFO] [1580333373.375626713]: Initializing nodelet with 12 worker threads.
[ INFO] [1580333373.383408765]: SDK version : 3.0.0
[ INFO] [1580333373.383445487]: *** PARAMETERS ***
[ INFO] [1580333373.383732718]:  * Camera Resolution        -> HD1080
[ INFO] [1580333373.384027701]:  * Camera Framerate     -> 15
[ INFO] [1580333373.384311215]:  * Gpu ID           -> -1
[ INFO] [1580333373.384499818]:  * Camera ID            -> -1
[ INFO] [1580333373.384677466]:  * Verbose          -> ENABLED
[ INFO] [1580333373.385009471]:  * Camera Flip          -> DISABLED
[ INFO] [1580333373.385326903]:  * Self calibration     -> ENABLED
[ INFO] [1580333373.385646420]:  * Camera Model by param    -> zed
[ INFO] [1580333373.385813835]:  * Color Enhancement        -> ENABLED
[ INFO] [1580333373.386032418]:  * Depth quality        -> Unknown
[ INFO] [1580333373.386212293]:  * Depth Sensing mode       -> STANDARD
[ INFO] [1580333373.386479835]:  * OpenNI mode          -> DISABLED
[ INFO] [1580333373.386759792]:  * Depth Stabilization      -> ENABLED
[ INFO] [1580333373.387015110]:  * Minimum depth        -> 0.7 m
[ INFO] [1580333373.387252904]:  * Maximum depth        -> 10 m
[ INFO] [1580333373.387480054]:  * Path rate            -> 2 Hz
[ INFO] [1580333373.387713033]:  * Path history size        -> 1
[ INFO] [1580333373.388261352]:  * Odometry DB path     -> 
[ INFO] [1580333373.388819280]:  * Spatial Memory       -> ENABLED
[ INFO] [1580333373.389075478]:  * IMU Fusion           -> ENABLED
[ INFO] [1580333373.389470509]:  * Floor alignment      -> DISABLED
[ INFO] [1580333373.389850446]:  * Init Odometry with first valid pose data -> ENABLED
[ INFO] [1580333373.390207412]:  * Two D mode           -> DISABLED
[ INFO] [1580333373.390692941]:  * Publish Pose Covariance  -> ENABLED
[ INFO] [1580333373.390875165]:  * Fixed covariance     -> DISABLED
[ INFO] [1580333373.391039702]:  * Fixed cov. value     -> 1e-06
[ INFO] [1580333373.391355681]:  * Mapping          -> DISABLED
[ INFO] [1580333373.391533136]:  * Mapping          -> DISABLED
[ INFO] [1580333373.391701111]:  * Sensors timestamp sync   -> DISABLED
[ INFO] [1580333373.391867376]:  * Sensors data freq        -> 0 Hz
[ INFO] [1580333373.392332114]:  * SVO REC compression      -> H265 (HEVC)
[ INFO] [1580333373.395744219]:  * world_frame          -> map
[ INFO] [1580333373.395764352]:  * map_frame            -> map
[ INFO] [1580333373.395772089]:  * odometry_frame       -> odom
[ INFO] [1580333373.395780922]:  * base_frame           -> base_link
[ INFO] [1580333373.395789763]:  * camera_frame         -> zed_camera_center
[ INFO] [1580333373.395800677]:  * imu_link         -> imu_link
[ INFO] [1580333373.395808776]:  * left_camera_frame        -> zed_left_camera_frame
[ INFO] [1580333373.395818194]:  * left_camera_optical_frame    -> zed_left_camera_optical_frame
[ INFO] [1580333373.395828534]:  * right_camera_frame       -> zed_right_camera_frame
[ INFO] [1580333373.395838813]:  * right_camera_optical_frame   -> zed_right_camera_optical_frame
[ INFO] [1580333373.395852967]:  * depth_frame          -> zed_left_camera_frame
[ INFO] [1580333373.395869497]:  * depth_optical_frame      -> zed_left_camera_optical_frame
[ INFO] [1580333373.395882644]:  * disparity_frame      -> zed_left_camera_frame
[ INFO] [1580333373.395891758]:  * disparity_optical_frame  -> zed_left_camera_optical_frame
[ INFO] [1580333373.395901032]:  * confidence_frame     -> zed_left_camera_frame
[ INFO] [1580333373.395910131]:  * confidence_optical_frame -> zed_left_camera_optical_frame
[ INFO] [1580333373.396353309]:  * Broadcast odometry TF    -> ENABLED
[ INFO] [1580333373.396710543]:  * Broadcast map pose TF    -> DISABLED
[ INFO] [1580333373.396902545]:  * [DYN] confidence     -> 97
[ INFO] [1580333373.397227539]:  * [DYN] mat_resize_factor  -> 1
[ INFO] [1580333373.397839753]:  * [DYN] point_cloud_freq   -> 5 Hz
[ INFO] [1580333373.398083036]:  * [DYN] brightness     -> 4
[ INFO] [1580333373.398462649]:  * [DYN] contrast       -> 4
[ INFO] [1580333373.398674240]:  * [DYN] hue            -> 0
[ INFO] [1580333373.398965801]:  * [DYN] saturation     -> 4
[ INFO] [1580333373.399309988]:  * [DYN] sharpness      -> 3
[ INFO] [1580333373.399503717]:  * [DYN] auto_exposure_gain -> ENABLED
[ INFO] [1580333373.400002668]:  * [DYN] auto_whitebalance  -> ENABLED
[ INFO] [1580333373.402588923]:  * Camera coordinate system -> COORDINATE_SYSTEM::RIGHT_HANDED_Z_UP_X_FWD
[ INFO] [1580333373.402629841]:  *** Opening ZED...
[ INFO] [1580333373.440412731]: rviz version 1.13.7
[ INFO] [1580333373.440450556]: compiled against Qt version 5.9.5
[ INFO] [1580333373.440463933]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1580333373.443329636]: Forcing OpenGl version 0.
[ INFO] [1580333373.864298173]: Stereo is NOT SUPPORTED
[ INFO] [1580333373.864349701]: OpenGl version: 4.6 (GLSL 4.6).
[ZED][Init] Depth mode: Unknown
[ZED][Init] Video mode: HD1080@15
[ INFO] [1580333553.463182811]: ZED connection -> SUCCESS
[ INFO] [1580333555.463436546]:  ...  ZED ready
[ INFO] [1580333555.472888116]:  * CAMERA MODEL  -> ZED
[ INFO] [1580333555.472967976]:  * Serial Number -> 11930
[ INFO] [1580333555.473013355]:  * Camera FW Version -> 1523
[ INFO] [1580333555.641552290]: Advertised on topic /zed/zed_node/rgb/image_rect_color
[ INFO] [1580333555.641860479]: Advertised on topic /zed/zed_node/rgb/camera_info
[ INFO] [1580333555.659644373]: Advertised on topic /zed/zed_node/rgb_raw/image_raw_color
[ INFO] [1580333555.659685167]: Advertised on topic /zed/zed_node/rgb_raw/camera_info
[ INFO] [1580333555.671326058]: Advertised on topic /zed/zed_node/left/image_rect_color
[ INFO] [1580333555.671375909]: Advertised on topic /zed/zed_node/left/camera_info
[ INFO] [1580333555.684092261]: Advertised on topic /zed/zed_node/left_raw/image_raw_color
[ INFO] [1580333555.684143249]: Advertised on topic /zed/zed_node/left_raw/camera_info
[ INFO] [1580333555.695799657]: Advertised on topic /zed/zed_node/right/image_rect_color
[ INFO] [1580333555.695822108]: Advertised on topic /zed/zed_node/right/camera_info
[ INFO] [1580333555.707664605]: Advertised on topic /zed/zed_node/right_raw/image_raw_color
[ INFO] [1580333555.707706523]: Advertised on topic /zed/zed_node/right_raw/camera_info
[ INFO] [1580333555.719772678]: Advertised on topic /zed/zed_node/depth/depth_registered
[ INFO] [1580333555.719795088]: Advertised on topic /zed/zed_node/depth/camera_info
[ INFO] [1580333555.732232559]: Advertised on topic /zed/zed_node/confidence/confidence_image
[ INFO] [1580333555.732258660]: Advertised on topic /zed/zed_node/confidence/camera_info
[ INFO] [1580333555.742832183]: Advertised on topic /zed/zed_node/stereo/image_rect_color
[ INFO] [1580333555.753235008]: Advertised on topic /zed/zed_node/stereo_raw/image_raw_color
[ INFO] [1580333555.753553979]: Advertised on topic /zed/zed_node/confidence/confidence_map
[ INFO] [1580333555.753905871]: Advertised on topic /zed/zed_node/disparity/disparity_image
[ INFO] [1580333555.754240496]: Advertised on topic /zed/zed_node/point_cloud/cloud_registered
[ INFO] [1580333555.754589195]: Advertised on topic /zed/zed_node/pose
[ INFO] [1580333555.754932857]: Advertised on topic /zed/zed_node/pose_with_covariance
[ INFO] [1580333555.755268154]: Advertised on topic /zed/zed_node/odom
[ INFO] [1580333555.755594333]: Advertised on topic /zed/zed_node/path_odom
[ INFO] [1580333555.755902824]: Advertised on topic /zed/zed_node/path_map
[ INFO] [1580333555.775853534]: Static transform Sensor to Base [zed_left_camera_frame -> base_link]
[ INFO] [1580333555.775882272]:  * Translation: {0.000,-0.060,0.000}
[ INFO] [1580333555.775890372]:  * Rotation: {0.000,-0.000,0.000}
[ INFO] [1580333555.775911897]: Static transform Sensor to Camera Center [zed_left_camera_frame -> zed_camera_center]
[ INFO] [1580333555.775921662]:  * Translation: {0.000,-0.060,0.000}
[ INFO] [1580333555.775934460]:  * Rotation: {0.000,-0.000,0.000}
[ INFO] [1580333555.775952673]: Static transform Camera Center to Base [zed_camera_center -> base_link]
[ INFO] [1580333555.775964490]:  * Translation: {0.000,0.000,0.000}
[ INFO] [1580333555.775975874]:  * Rotation: {0.000,-0.000,0.000}
[ INFO] [1580333555.893028222]: *** Starting Positional Tracking ***
[ INFO] [1580333555.893064919]:  * Waiting for valid static transformations...
[ INFO] [1580333555.993258393]: Initial ZED left camera pose (ZED pos. tracking): 
[ INFO] [1580333555.993410332]:  * T: [0,0.06,0]
[ INFO] [1580333555.993566880]:  * Q: [0,0,0,1]
[ INFO] [1580333556.042223145]: Odometry aligned to last tracking pose
Myzhar commented 4 years ago

Hi @Codeguyross to be sure to use the GPU that you want you can set its GPUid changing the general/gpu_id param in common.yaml

If you use the value -1 the ZED SDK will choose the better GPU for you and you can verify on which GPU the zed_wrapper is running using the nvidia_smi CLI command.

Furthermore we will add this information in the ZED Diagnostic to give a more complete ZED information.

Can I ask you why you need this information?

Codeguyross commented 4 years ago

i was looking to confirm if the zed was actually using the gpu or had failed to use the gpu and was instead using the cpu. Because I wasn't sure what integer i could set the gpu_id, and I couldn't see the gpu the zed was using, I couldnt be 100% that the GPU portion was working.

Is there documentation somewhere listing available options beyond the default value for parameters in the common.yaml file? The root of this question is coming from having poor results when trying to create a scan of an area using the zed and so I would like more options with parameters to be able to try to correct the poor quality scans.

Also, thanks for the reply! I wasnt sure if i was in the right place to ask these questions.

Myzhar commented 4 years ago

This is the right place for this kind of question and you're always welcome. About the use of the GPU, the ZED SDK needs CUDA and the depth processing (and many other algorithms) runs only on the GPU. About the documentation, the right place is the Stereolabs website: https://www.stereolabs.com/docs/ros/zed_node/

Do not hesitate to open new issues if you need more support.