Mobile Robot Control 2024 Ultron: Difference between revisions
Jump to navigation
Jump to search
(Created page with " ===Group members:=== {| class="wikitable" |+Caption !Name!!student ID |- |example name||01234567 |}") |
No edit summary |
||
(7 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
===Group members | ===Group members=== | ||
{| class="wikitable" | {| class="wikitable" | ||
|+Caption | |+Caption | ||
!Name!!student ID | !Name!!student ID | ||
|- | |- | ||
| | |Hao Zhou||2009447 | ||
|- | |||
|Aori Qiling | |||
|1942352 | |||
|- | |||
|Chuyu Lu | |||
|1936964 | |||
|- | |||
|Yuntong Li | |||
|1921703 | |||
|- | |||
| | |||
| | |||
|- | |||
| | |||
| | |||
|} | |} | ||
Exercise1 | |||
Hao: | |||
# Boolean Flag: | |||
#* A boolean flag named 'move ' is used to control whether the robot should continue moving or stop. | |||
#* It is initialized to 'true', indicating that the robot is initially allowed to move. | |||
# Obstacle Detection: | |||
#* The program continuously reads laser sensor data inside the control loop. | |||
#* If any distance measurement from the laser scan is less than 0.2, an obstacle is detected. | |||
# Stopping Action: | |||
#* When an obstacle is detected, the 'move ' flag is set to 'false'. | |||
#* Setting 'move ' to 'false' indicates that the robot should stop moving. | |||
#* Additionally, a stop command 'io.sendBaseReference(0, 0, 0)' is sent to the base controller immediately after detecting the obstacle. | |||
# Control Loop Condition: | |||
#* The control loop continues executing as long as the robot is properly connected 'io.ok()' and the 'move ' flag is 'true'. | |||
#* Once the 'move' flag is set to 'false' , the control loop stops executing, effectively halting the robot's motion. | |||
[[File:Execise1 Hao.png|thumb]] |
Revision as of 23:19, 27 April 2024
Group members
Name | student ID |
---|---|
Hao Zhou | 2009447 |
Aori Qiling | 1942352 |
Chuyu Lu | 1936964 |
Yuntong Li | 1921703 |
Exercise1
Hao:
- Boolean Flag:
- A boolean flag named 'move ' is used to control whether the robot should continue moving or stop.
- It is initialized to 'true', indicating that the robot is initially allowed to move.
- Obstacle Detection:
- The program continuously reads laser sensor data inside the control loop.
- If any distance measurement from the laser scan is less than 0.2, an obstacle is detected.
- Stopping Action:
- When an obstacle is detected, the 'move ' flag is set to 'false'.
- Setting 'move ' to 'false' indicates that the robot should stop moving.
- Additionally, a stop command 'io.sendBaseReference(0, 0, 0)' is sent to the base controller immediately after detecting the obstacle.
- Control Loop Condition:
- The control loop continues executing as long as the robot is properly connected 'io.ok()' and the 'move ' flag is 'true'.
- Once the 'move' flag is set to 'false' , the control loop stops executing, effectively halting the robot's motion.