Professional Documents
Culture Documents
Arif Rahman
arifrahman.maar@gmail.com
Parking
sign?
3
Get the code
1. Copy turtlebot3_fira_parking.launch to
catkin_ws/src/turtlebot3_simulations/turtlebot3_gazebo/launch
4
Get the code
5. Copy projection (fira_sim).yaml into
catkin_ws/src/turtlebot3_autorace/turtlebot3_autorace_camera/calibration/extrinsic_calibrat
ion/
Make a backup copy of your current projection.yaml file.
Then change the name of projection (fira_sim).yaml to projection.yaml
5
Running the simulation
Terminal 1:
$ roslaunch turtlebot3_gazebo turtlebot3_fira_parking.launch
Terminal 2:
$ export GAZEBO_MODE=true
$ export AUTO_IN_CALIB=action
$ roslaunch turtlebot3_autorace_camera
turtlebot3_autorace_intrinsic_camera_calibration.launch
Terminal 3:
$ export AUTO_EX_CALIB=action
$ export AUTO_DT_CALIB=action
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_autorace_core turtlebot3_autorace_core.launch
6
Running the simulation
Terminal 4:
$ rostopic pub -1 /core/decided_mode std_msgs/UInt8 "data: 2"
Ref: http://emanual.robotis.com/docs/en/platform/turtlebot3/autonomous_driving/#autorace-with-gazebo
7
Running on the real robot
Terminal 1 (On remote PC):
$ roslaunch turtlebot3_gazebo turtlebot3_fira_parking.launch
If using PiCam:
Terminal 2 (On robot):
$ export GAZEBO_MODE=false
$ export AUTO_IN_CALIB=action
$ roslaunch turtlebot3_autorace_camera
turtlebot3_autorace_intrinsic_camera_calibration.launch
If using webcam:
On robot:
$ rosrun usb_cam usb_cam_node
On laptop:
$ rosrun image_transport republish compressed in:=/usb_cam/image_raw raw out:=/camera/image
8
Running on the real robot
Terminal 3 (On remote PC):
$ export AUTO_EX_CALIB=action
$ export AUTO_DT_CALIB=action
$ export TURTLEBOT3_MODEL=burger
$ roslaunch turtlebot3_autorace_core turtlebot3_autorace_core.launch
Ref: http://emanual.robotis.com/docs/en/platform/turtlebot3/autonomous_driving/#autorace-with-gazebo
9
Extrinsic camera calibration
Terminal 1:
$ roscore
Terminal 2:
$ export GAZEBO_MODE=true
$ export AUTO_IN_CALIB=action
$ roslaunch turtlebot3_autorace_camera
turtlebot3_autorace_intrinsic_camera_calibration.launch
Terminal 3:
$ export AUTO_EX_CALIB=calibration
$ roslaunch turtlebot3_autorace_camera
turtlebot3_autorace_extrinsic_camera_calibration.launch
10
Extrinsic camera calibration
Terminal 4:
$ rqt
Then select:
Plugins > Configuration > Dynamic Reconfigure (select /camera/image_projection)
Plugins > Visualization > Image View (topic /camera/image_extrinsic_calib/compressed )
Plugins > Visualization > Image View (topic /camera/image_projected_compensated )
1. Adjust the image projection parameters (top_x, top_y, bottom_x & bottom_y) such that in the image
/camera/image_projected_compensated you can see the two lines are in parallel.
2. Test at all parts of the track.
3. Overwrite each values on to
turtlebot3_autorace_camera/calibration/extrinsic_calibration/projection.yaml
11
Settings for Simulation
Terminal 1:
$ roscore
Terminal 2:
$ export GAZEBO_MODE=true
$ export AUTO_IN_CALIB=action
$ roslaunch turtlebot3_autorace_camera
turtlebot3_autorace_intrinsic_camera_calibration.launch
Terminal 3:
$ export AUTO_EX_CALIB=action
$ roslaunch turtlebot3_autorace_camera
turtlebot3_autorace_extrinsic_camera_calibration.launch
12
Settings for Real Robot
Terminal 1 (on Remote PC):
$ roscore
Terminal 5:
$ rqt
Then select:
Plugins > Configuration > Dynamic Reconfigure (select /detect_lane)
Plugins > Visualization > Image View (topic /detect/image_yellow_lane_marker/compressed)
Plugins > Visualization > Image View (topic /detect/image_lane/compressed)
Plugins > Visualization > Image View (topic /detect/image_white_lane_marker/compressed)
1. Adjust the white and yellow HSV values so that it only detects their colour.
2. Test at all parts of the track. 14
3. Overwrite the values on to turtlebot3_autorace_detect/param/lane/lane.yaml
Lane Detection - Test
Terminal 4:
$ export AUTO_DT_CALIB=action
$ roslaunch turtlebot3_autorace_detect
turtlebot3_autorace_detect_lane.launch
Terminal 5:
$ roslaunch turtlebot3_autorace_control turtlebot3_autorace_control_lane.launch
15
Traffic Sign Detection - Setup
Terminal 4:
$ rqt
Select:
1. Place the robot in front of the sign to be detected, and take a screen shot of the camera view.
Ref: http://emanual.robotis.com/docs/en/platform/turtlebot3/autonomous_driving/#tutorials-52-traffic-sign
16
Traffic Sign Detection - Test
Terminal 4:
$ rqt
Select:
Terminal 5:
Move the robot in front of the sign, and test the detection result.
17
18