Functions | |
| create_pose_stamped (navigator, position_x, position_y, rotation_z) | |
| navigator using x, y, z coordinates. | |
| generate_random_waypoint () | |
| random waypoint generator within a given range. | |
| main () | |
| Size of the array. | |
| custome_commander.create_pose_stamped | ( | navigator, | |
| position_x, | |||
| position_y, | |||
| rotation_z ) |
navigator using x, y, z coordinates.
Axis Z will have the robot face in a certain direction.
| navigator | will be the Robot. |
| position_x | will be X axis. |
| position_y | will be Y axis. |
| rotation_z | will be Z axis. def create_pose_stamped(navigator, position_x, position_y, rotation_z): |
| custome_commander.generate_random_waypoint | ( | ) |
random waypoint generator within a given range.
position_x = random.uniform(-2.0, 2.0)
| custome_commander.main | ( | ) |
Size of the array.
num_waypoints = 30. waypoints = []. for _ in range(num_waypoints):.
calls random_waypoint function.
waypoint = generate_random_waypoint().
adds the waypoint to create_pose_stamped function.
waypoints.append(create_pose_stamped(nav, *waypoint)).