이 프로젝트는 Gazebo에서 로봇 제어를 시작하기 위한 최소 구성입니다.
핵심 흐름:
- Gazebo 설치
- 커스텀 월드 실행
- 토픽으로 속도 명령 전송
- Rust CLI 컨트롤러로 상호작용 제어
./scripts/install_gazebo_macos.sh수동 설치:
brew tap osrf/simulation
brew install gz-harmonic설치 확인:
gz sim --versionsmacOS 버전/그래픽 드라이버 이슈가 있으면 Docker(우분투 기반)로 실행할 수 있습니다.
프로젝트 루트에서 실행:
gz sim -s worlds/simple_robot_world.sdf -r --render-engine-server ogre2 --render-engine-server-api-backend metal다른 터미널에서 GUI 실행:
gz sim -g --render-engine-gui ogre2 --render-engine-gui-api-backend metal다른 터미널에서 1회 명령 전송:
gz topic -t /model/mybot/cmd_vel -m gz.msgs.Twist -p "linear: {x: 0.5} angular: {z: 0.0}" -n 1연속 전송:
gz topic -t /model/mybot/cmd_vel -m gz.msgs.Twist -p "linear: {x: 0.4} angular: {z: 0.2}" -r 10cd rust-cli-controller
cargo run --bin cliGUI 패널 실행:
cd rust-cli-controller
cargo run --bin guiworlds/simple_robot_world.sdf: 시뮬레이터 월드 + 차동구동 로봇 모델scripts/install_gazebo_macos.sh: Homebrew 설치 스크립트rust-cli-controller/: 1주차 Rust 터미널 컨트롤러
- SDF에 센서 추가(Lidar, Camera, IMU)
- 센서 토픽 구독 후 의사결정 로직 작성
- 상태 머신(FSM) 도입(탐색/회피/목표 이동)
- 로그 저장 및 재생으로 디버깅 강화
gz명령을 못 찾는 경우:source ~/.zshrc
gz는 되는데gz sim이 없으면:brew install gz-sim8 gz-gui8 gz-launch7 gz-physics7 gz-sensors8 gz --commands gz sim --versions
- macOS에서 GUI가 깨지거나 크래시 나면 렌더러 백엔드(
ogre2 + metal/opengl)를 바꿔서 재시도 - 로봇이 안 움직이면 토픽 목록과 타입을 확인:
gz topic -l