Recording bag with RealSense T265

1. Install the driver. (Many tutorials, self-search)

2. The terminal runs realsense-viewer, which has its own record, but the format of the imu in the bag is wrong, so give up.

3. Use rosbag to record.

1. Install the ros space

2. Modify the rs_t265.launch file at /home/liubo/realsense_ws/src/realsense-ros/realsense2_camera/launch

 

   Modify <arg name="unite_imu_method" default="copy"/> to merge IMU information, the default merged topic is /camera/imu

3. Start preparing for recording

cd realsense_ws/

source devel/setup.bash

roslaunch realsense2_camera demo_t265.launch #Run the camera, automatically open rviz, you can ADD topic, observe left and right eyes and IMU image information

rosrun topic_tools throttle messages /camera/imu 200.0 /imu #Set the /camera/imu topic to 200hz and rename it to /imu 

rosrun topic_tools throttle messages /camera/fisheye1/image_raw 20.0 /fisheye1 #Set the /camera/fisheye1/image_raw topic to 20hz and rename it to /fisheye1 

rosrun topic_tools throttle messages /camera/fisheye2/image_raw 20.0 /fisheye2 #Set the /camera/fisheye2/image_raw topic to 20hz and rename it to /fisheye2

osbag record -O test /fisheye1 /fisheye2 /imu #Specify three topics to start recording the package named test, and the location is in the folder of the open terminal.

4. After recording, you can use rosbag info -y test.bag to view the topic and recording quantity.

 Five, processing bag

Run python test.py to unpack

One of the images for the left eye is:

Add internal parameters fx, fy, cx, cy, k1-k4 by yourself, (can be calibrated with kalibr) for de-distortion processing: (Refer to the fourteenth lecture CH5 to change the distortion formula to a fisheye camera)

result:

 

 

 

Guess you like

Origin blog.csdn.net/weixin_44760904/article/details/130512863
Bag