|
| __init__ (self, list[PoseStamped] waypoints) |
|
| rotate (self) |
| Rotate 90 degrees with this fuction.
|
|
| move_forward (self) |
| Function that makes the roomba move foward.
|
|
| move_spiral_pattern (self) |
| This function combines rotate() and move_foward() to create the spiral pattern.
|
|
| hazard_callback (self, HazardDetectionVector hazards) |
| Callback function used to indicate when its time to move to the next point after hitting an obstacle.
|
|
| move_to_waypoint (self, PoseStamped waypoint) |
| Function that tells to roomba to move to a point on the map.
|
|
◆ __init__()
GridSpiralAlgorithm.MoveToPoints.__init__ |
( |
| self, |
|
|
list[PoseStamped] | waypoints ) |
◆ hazard_callback()
GridSpiralAlgorithm.MoveToPoints.hazard_callback |
( |
| self, |
|
|
HazardDetectionVector | hazards ) |
Callback function used to indicate when its time to move to the next point after hitting an obstacle.
This function continuously spirals until an obstacle has been hit using the function is_front_hazard_active. Once it hits an obstacle has been hit it stops the spiral entriely then takes the first waypoint from waypoints and moves to that location. After it reaches said location it will reset the values used to calculate create the grid spiral and starts spiral from 0. This process is repeated over and over untill all the waypoints have been met stopping the roomba.
- Parameters
-
This helps us generate a boolean value to stop or start the spiral
- See also
- is_front_hazard_active(hazard) self.move_to_waypoints(PoseStamped)
- Returns
- This function returns nothing
◆ move_forward()
GridSpiralAlgorithm.MoveToPoints.move_forward |
( |
| self | ) |
|
Function that makes the roomba move foward.
This function keeps track of the distance the roomba has to cover to allow the spiral to correctly increase in size
- Returns
- This function returns nothing it just publishes the correct distance the roomba must travel to 'cmd_vel'
◆ move_spiral_pattern()
GridSpiralAlgorithm.MoveToPoints.move_spiral_pattern |
( |
| self | ) |
|
This function combines rotate() and move_foward() to create the spiral pattern.
This function first uses move_foward to tell the roomba to move the initial distance of 0.4m becasue that is the width of the roomba. Once the roomba has reached its publish distance it then changes states from moving to rotating and waits 8 seconds before moving on to the next command so it can properly rotate 90 degrees. It then changes back to move foward and repeates this process. After it has repeated this process twice it will incriment the distance by 0.4m and continue this pattern moving in a grid spiral.
- See also
- move_forward() and rotate()
- Returns
- This function returns nothing
◆ move_to_waypoint()
GridSpiralAlgorithm.MoveToPoints.move_to_waypoint |
( |
| self, |
|
|
PoseStamped | waypoint ) |
Function that tells to roomba to move to a point on the map.
using a pregenerated passed in point the roomba moves to the location of the point on a map
- Parameters
-
an object of class PoseStamped that contains the coordinates of a point
- Returns
- This function returns nothing
◆ rotate()
GridSpiralAlgorithm.MoveToPoints.rotate |
( |
| self | ) |
|
Rotate 90 degrees with this fuction.
Roates slowly multiple times until an angle of 90 degrees have been reached
- Returns
- This function does not return anything just publishes to the topic 'cmd_vel'
◆ callback
GridSpiralAlgorithm.MoveToPoints.callback |
◆ check_rotation
GridSpiralAlgorithm.MoveToPoints.check_rotation |
◆ count
GridSpiralAlgorithm.MoveToPoints.count |
◆ desire_distance
GridSpiralAlgorithm.MoveToPoints.desire_distance |
◆ hazard_callback
GridSpiralAlgorithm.MoveToPoints.hazard_callback |
◆ hazard_detected
GridSpiralAlgorithm.MoveToPoints.hazard_detected |
◆ hazard_subscriber_
GridSpiralAlgorithm.MoveToPoints.hazard_subscriber_ |
◆ nav
GridSpiralAlgorithm.MoveToPoints.nav |
◆ next_publish_duration
GridSpiralAlgorithm.MoveToPoints.next_publish_duration |
◆ publisher
GridSpiralAlgorithm.MoveToPoints.publisher |
◆ scallback
GridSpiralAlgorithm.MoveToPoints.scallback |
◆ speed_forward
GridSpiralAlgorithm.MoveToPoints.speed_forward |
◆ start_time
GridSpiralAlgorithm.MoveToPoints.start_time |
◆ state
GridSpiralAlgorithm.MoveToPoints.state |
◆ tcallback
GridSpiralAlgorithm.MoveToPoints.tcallback |
◆ timer
GridSpiralAlgorithm.MoveToPoints.timer |
◆ waypoints
GridSpiralAlgorithm.MoveToPoints.waypoints |
The documentation for this class was generated from the following file: