mirror of
https://github.com/AtsushiSakai/PythonRobotics.git
synced 2026-04-22 03:00:22 -04:00
move to pose test and animation are added
This commit is contained in:
BIN
PathTracking/move_to_pose/animation.gif
Normal file
BIN
PathTracking/move_to_pose/animation.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.2 MiB |
@@ -110,17 +110,19 @@ def transformation_matrix(x, y, theta):
|
||||
|
||||
|
||||
def main():
|
||||
x_start = 20 * random()
|
||||
y_start = 20 * random()
|
||||
theta_start = 2 * np.pi * random() - np.pi
|
||||
x_goal = 20 * random()
|
||||
y_goal = 20 * random()
|
||||
theta_goal = 2 * np.pi * random() - np.pi
|
||||
print("Initial x: %.2f m\nInitial y: %.2f m\nInitial theta: %.2f rad\n" %
|
||||
(x_start, y_start, theta_start))
|
||||
print("Goal x: %.2f m\nGoal y: %.2f m\nGoal theta: %.2f rad\n" %
|
||||
(x_goal, y_goal, theta_goal))
|
||||
move_to_pose(x_start, y_start, theta_start, x_goal, y_goal, theta_goal)
|
||||
|
||||
for i in range(5):
|
||||
x_start = 20 * random()
|
||||
y_start = 20 * random()
|
||||
theta_start = 2 * np.pi * random() - np.pi
|
||||
x_goal = 20 * random()
|
||||
y_goal = 20 * random()
|
||||
theta_goal = 2 * np.pi * random() - np.pi
|
||||
print("Initial x: %.2f m\nInitial y: %.2f m\nInitial theta: %.2f rad\n" %
|
||||
(x_start, y_start, theta_start))
|
||||
print("Goal x: %.2f m\nGoal y: %.2f m\nGoal theta: %.2f rad\n" %
|
||||
(x_goal, y_goal, theta_goal))
|
||||
move_to_pose(x_start, y_start, theta_start, x_goal, y_goal, theta_goal)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
@@ -645,6 +645,13 @@ Ref:
|
||||
|
||||
# Path tracking
|
||||
|
||||
## move to a pose control
|
||||
|
||||
This is a simulation of moving to a pose control
|
||||
|
||||

|
||||
|
||||
|
||||
## Pure pursuit tracking
|
||||
|
||||
Path tracking simulation with pure pursuit steering control and PID speed control.
|
||||
|
||||
Reference in New Issue
Block a user