- 執行以下指令進入環境:
./car_control.sh
- 在環境內輸入
r來執行建置與設定:r # 進行 colcon build 並執行 . ./install/setup.bash
執行以下指令來開始車輛控制:
ros2 run pros_car_py robot_control執行後,畫面將會顯示控制介面。
| 鍵盤按鍵 | 功能描述 |
|---|---|
w |
前進 |
s |
後退 |
a |
左斜走 |
d |
右斜走 |
e |
左自轉 |
r |
右自轉 |
z |
停止 |
q |
回到主選單 |
- 進入機械臂控制模式後,選擇 0~4 號關節 來調整角度。
- 角度調整指令:
鍵盤按鍵 功能描述 i增加角度 k減少角度 q回到關節選擇
共有 兩種自動導航模式:
- 功能:接收 Foxglove 所發送的
/goal_pose座標 來進行導航。
- 功能:由
car_controller.py內部自動publish/goal_pose座標,進行自動導航。
📢 注意:在使用導航模式時,按下 q 即可立即停止車輛移動並退出導航模式。
- Enter the environment by running:
./car_control.sh
- Inside the environment, enter
rto build and set up:r # Run colcon build and source setup.bash
Start vehicle control by running:
ros2 run pros_car_py robot_controlOnce started, the control interface will appear.
| Key | Action |
|---|---|
w |
Move forward |
s |
Move backward |
a |
Move diagonally left |
d |
Move diagonally right |
e |
Rotate left |
r |
Rotate right |
z |
Stop |
q |
Return to the main menu |
- Enter joint control mode, then select a joint (0~4) to adjust its angle.
- Use the following keys to control the joint angles:
Key Action iIncrease angle kDecrease angle qReturn to joint selection
There are two autonomous navigation modes:
- Function: Receives
/goal_posecoordinates from Foxglove and navigates accordingly.
- Function:
car_controller.pyinternally publishes/goal_posecoordinates for automatic navigation.
📢 Note: Press q at any time to stop the vehicle immediately and exit navigation mode.
