Skip to content

Instantly share code, notes, and snippets.

@Kyungpyo-Kim
Last active May 12, 2018 00:24
Show Gist options
  • Save Kyungpyo-Kim/7ee6807f76fbee75271fb9d4d721c832 to your computer and use it in GitHub Desktop.
Save Kyungpyo-Kim/7ee6807f76fbee75271fb9d4d721c832 to your computer and use it in GitHub Desktop.
Webots environment setup tutorial

Webots Tutorial

Reference

준비물

Online 에서 지도(osm) 파일 다운로드

OSM file 을 이용해 Webots worlds 파일 생성

  • Dependencies 설치

    sudo apt-get install python-pip
    sudo pip install lxml pyproj shapely webcolors configparser
    
  • 환경 setup

    export WBT_PROJECT_PATH=$HOME/webots/test_project  # define here your project path
    mkdir -p $WBT_PROJECT_PATH/worlds/map_net
    export WEBOTS_HOME=/usr/local/webots
    
  • importer.py 을 이용한 OSM 파일 변환

    cd $WEBOTS_HOME/resources/osm_importer
    python importer.py --input=$HOME/Downloads/map.osm --output=$WBT_PROJECT_PATH/worlds/map.wbt
    
  • Webot 실행 후 생성된 .wbt 파일 오픈하여 변환 되었는지 확인

  • .wbt 파일을 이용해 SUMO(node, edge) 파일 export

    cd $WEBOTS_HOME/resources/sumo_exporter
    python exporter.py --input=$WBT_PROJECT_PATH/worlds/map.wbt --output=$WBT_PROJECT_PATH/worlds/map_net/
    
  • Netedit를 실행하여

@Kyungpyo-Kim
Copy link
Author

sumo.flow.xml 에서 flow id 가 중복되면 안됨,
folder-structure 도 변경하면 안됨(folder 명 포함)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment