Skip to content

Quick test with sample rosbag

koide3 edited this page Aug 20, 2021 · 1 revision

Environment

Tested on

  • Ubuntu 20.04 with CUDA 11.2 (CUDA >= 10.2 required)

Download rosbag

mono00.bag (256MB)

topics:      /top_front_camera/camera_info            854 msgs    : sensor_msgs/CameraInfo     
             /top_front_camera/image_raw/compressed   855 msgs    : sensor_msgs/CompressedImage

Setup Camera Info

Create ~/.ros/camera_info/top_front_camera.yaml and write in the following:

image_width: 1920
image_height: 1080
camera_name: top_front_camera
camera_matrix:
  rows: 3
  cols: 3
  data: [698.7720089327581, 0, 948.6984995929716, 0, 694.4581011591363, 616.7070850305417, 0, 0, 1]
distortion_model: plumb_bob
distortion_coefficients:
  rows: 1
  cols: 5
  data: [-0.01537233838335354, -0.01014287588454407, 0.0002858743531724768, -0.0007284003454982942, 0]
rectification_matrix:
  rows: 3
  cols: 3
  data: [1, 0, 0, 0, 1, 0, 0, 0, 1]
projection_matrix:
  rows: 3
  cols: 4
  data: [637.4007568359375, 0, 938.8160461941588, 0, 0, 683.8585815429688, 619.8708349350127, 0, 0, 0, 1, 0]

Docker image

sudo docker pull koide3/monocular_person_following:noetic

Launch

Start roscore:

roscore

Set use_sim_time to true and start visualization:

rosparam set use_sim_time true

cd /tmp
wget https://github.com/koide3/monocular_person_following/raw/master/rviz/monocular_person_following.rviz
rviz -d monocular_person_following.rviz

Launch usb_cam and tf_publishers in sim mode:

sudo docker run -it --rm \
                --net host \
                -v $(realpath ~/.ros/camera_info):/root/.ros/camera_info \
                koide3/monocular_person_following:noetic \
                roslaunch monocular_person_following start_robot.launch webcam:=true publish_dummy_frames:=true camera_xyz:="0 0 1.4" camera_rpy:="0 0 0" sim:=true

Launch tf_openpose and monocular_person_following:

sudo docker run -it --rm \
                --net host \
                --gpus all \
                koide3/monocular_person_following:noetic \
                roslaunch monocular_person_following jetson_person_following.launch camera_name:=/top_front_camera/qhd allow_growth:=true

Play rosbag:

rosbag play --clock mono00.bag

Example video

Screenshot_20210820_182655 Video

You can become the target by raising the right hand