Calvin and I worked on making ros commands work with the goal to control the realsense camera with ros commands, similar to the way we can control Handy with the ros commands.
Run the physical camera with roslaunch realsense2_camera rs_camera.launch
. Note that you can set specifications like so:
roslaunch realsense2_camera rs_camera.launch align_depth:=true
This makes it publish the aligned depth stream to other available streams such as color or infra-red.
Run rviz with rosrun rviz rviz
- Add display (bottom left button)
- Create visualization by topic
- Under the relevant dropdown, click on Image
- Press OK
Results of these camera types:
Terminal command rostopic list
:
/camera/color/camera_info
/camera/color/image_raw
/camera/color/image_raw/compressed
/camera/color/image_raw/compressed/parameter_descriptions
/camera/color/image_raw/compressed/parameter_updates
/camera/color/image_raw/compressedDepth
/camera/color/image_raw/compressedDepth/parameter_descriptions
/camera/color/image_raw/compressedDepth/parameter_updates
/camera/color/image_raw/theora
/camera/color/image_raw/theora/parameter_descriptions
/camera/color/image_raw/theora/parameter_updates
/camera/color/metadata
/camera/depth/camera_info
/camera/depth/image_rect_raw
/camera/depth/image_rect_raw/compressed
/camera/depth/image_rect_raw/compressed/parameter_descriptions
/camera/depth/image_rect_raw/compressed/parameter_updates
/camera/depth/image_rect_raw/compressedDepth
/camera/depth/image_rect_raw/compressedDepth/parameter_descriptions
/camera/depth/image_rect_raw/compressedDepth/parameter_updates
/camera/depth/image_rect_raw/theora
/camera/depth/image_rect_raw/theora/parameter_descriptions
/camera/depth/image_rect_raw/theora/parameter_updates
/camera/depth/metadata
/camera/extrinsics/depth_to_color
/camera/motion_module/parameter_descriptions
/camera/motion_module/parameter_updates
/camera/realsense2_camera_manager/bond
/camera/rgb_camera/auto_exposure_roi/parameter_descriptions
/camera/rgb_camera/auto_exposure_roi/parameter_updates
/camera/rgb_camera/parameter_descriptions
/camera/rgb_camera/parameter_updates
/camera/stereo_module/auto_exposure_roi/parameter_descriptions
/camera/stereo_module/auto_exposure_roi/parameter_updates
/camera/stereo_module/parameter_descriptions
/camera/stereo_module/parameter_updates
/clicked_point
/diagnostics
/initialpose
/move_base_simple/goal
/rosout
/rosout_agg
/tf
/tf_static
Terminal command: rostopic echo /camera/infra1/camera_info | head -n100
gives information about a frame from the camera:
header:
seq: 3073
stamp:
secs: 389
nsecs: 374000000
frame_id: "camera_left_ir_optical_frame"
height: 720
width: 1280
distortion_model: "plumb_bob"
D: []
K: [695.9951171875, 0.0, 640.0, 0.0, 695.9951171875, 360.0, 0.0, 0.0, 1.0]
R: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
P: [695.9951171875, 0.0, 640.0, 0.0, 0.0, 695.9951171875, 360.0, 0.0, 0.0, 0.0, 1.0, 0.0]
binning_x: 0
binning_y: 0
roi:
x_offset: 0
y_offset: 0
height: 0
width: 0
do_rectify: False
---
Can now set parameters via roslaunch in a new file called rs_camera_experiments.launch
. In order to test this, we edited the align_depth parameter to be true in the file and ran the file. The aligned_depth camera came up in rviz :)
Q: What is the dimensions of the color and depth channels on the camera?
A: In exploration (I don't know what dimensions mean)
Q: Does the ros module work on the physical camera?
A: The ros module does work on the physical camera!
Q:What is the behavior of the aligned depth image?
A: Aligned depth image looks to be more zoomed in and blurrier? It has less of a gradient shading on the image too. The topics produced is called aligned_depth_to_color
Perhaps our next step is to enable pointcloud, which takes in information from the image produced by aligned_depth_to_color. Also, we might want to try putting more objects under the cmaera to see how it interprets them, since right now the camera is mostly just fixed on a flat surface.
FOR PICK-AND-PLACE
First follow the instructions above to run realsense-ros. Make sure
/camera/aligned_depth_to_color/image_raw
and/camera/color/image_raw
are working properly.Then follow the instructions from: https://github.com/Autobots-Visman/pick-and-place
MAKE SURE THE NVIDIA CUDA DRIVER IS COMPATIBLE WITH BEFORE CONTINUING
// This comment is temporary