.. Cover Letter

공부#Robotics#자율주행/autoware

3. Rosbag replay simulation

BrainKimDu 2023. 4. 11. 18:09

https://autowarefoundation.github.io/autoware-documentation/main/tutorials/ad-hoc-simulation/rosbag-replay-simulation/

 

Rosbag replay simulation - Autoware Documentation

Rosbag replay simulation Steps Download and unpack a sample map. You can also download the map manually. gdown -O ~/autoware_map/ 'https://docs.google.com/uc?export=download&id=1A-8BvYRX3DhSzkAnOcGWFw5T30xTlwZI' unzip -d ~/autoware_map/ ~/autoware_map/samp

autowarefoundation.github.io

Preparation

  • docker실행
sudo rocker --nvidia --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map --  autoware_build:0.2
  • map 파일을 다운받아야합니다.
gdown -O ~/autoware_map/ 'https://docs.google.com/uc?export=download&id=1A-8BvYRX3DhSzkAnOcGWFw5T30xTlwZI'
unzip -d ~/autoware_map/ ~/autoware_map/sample-map-rosbag.zip
  • rosbag 파일을 다운로드 받습니다.
gdown -O ~/autoware_map/ 'https://docs.google.com/uc?export=download&id=1VnwJx9tI3kI_cTLzP61ktuAJ1ChgygpG'
unzip -d ~/autoware_map/ ~/autoware_map/sample-rosbag.zip
  • 간단하게 시나리오대로 정의된 동작을 수행하는 시뮬레이션으로 보입니다.

How to run rosbag replay simulation

source install/setup.bash
ros2 launch autoware_launch logging_simulator.launch.xml map_path:=$HOME/autoware_map/sample-map-rosbag vehicle_model:=sample_vehicle sensor_model:=sample_sensor_kit

다음처럼 생긴 맵입니다. 이제 rosbag file을 Play해봅시다. 새로운 터미널을 열고 docker로 접속해야합니다.

아직 docker를 저장하지 않았기 때문에 새로운 docker에서도 다운로드를 진행해줍시다.

sudo rocker --nvidia --x11 --user --volume $HOME/autoware --volume $HOME/autoware_map --  autoware_build:0.2
source install/setup.bash
ros2 bag play ~/autoware_map/sample-rosbag/sample.db3 -r 0.2 -s sqlite3
 

 

 

 

잘움직입니다..

 

시점 전환도 가능합니다. Focus camera에서 Target Frane을 Base_link로 바꿉니다. 그러면 top View에서 자동차를 따라가게 됩니다. 여기서 Type을 Third Person Follower 로 변경하면

 

이런식으로 3D형태로도 볼 수 있습니다.

 

'공부#Robotics#자율주행 > autoware' 카테고리의 다른 글

2. Planning simulation  (0) 2023.04.11
1. autoware 듀토리얼  (0) 2023.04.11
ubuntu 20.04, 22.04 autoware 설치하기  (0) 2023.03.28