Classes | |
| class | ObstacleAvoidance |
Functions | |
| is_front_hazard_active (hazards) | |
| send_velocity_command (self, hazard_detected) | |
| hazard_callback (self, HazardDetectionVector hazards) | |
| hazard callback. | |
| main (args=None) | |
| Use spin() to continuously run the node. | |
Variables | |
| str | yaml_file_path = "room_map_save.yaml" |
| yaml_data = yaml.safe_load(file) | |
| Open the YAML file and load its contents. | |
| cmd_vel_pub | |
| Twist publisher. | |
| hazard_sub | |
| Hazard subscriber. | |
| _start_time | |
| obstacle_avoid.hazard_callback | ( | self, | |
| HazardDetectionVector | hazards ) |
| obstacle_avoid.is_front_hazard_active | ( | hazards | ) |
| hazards |
| obstacle_avoid.main | ( | args = None | ) |
Use spin() to continuously run the node.
| obstacle_avoid.send_velocity_command | ( | self, | |
| hazard_detected ) |
| self | |
| hazard_detected |
|
protected |
| double |
| obstacle_avoid.cmd_vel_pub |
Twist publisher.
self.cmd_vel_pub = self.create_publisher(Twist, "/cmd_vel", 10)
| obstacle_avoid.hazard_sub |
Hazard subscriber.
self.hazard_sub = self.create_subscription(HazardDetectionVector, "/hazard_detection", self.hazard_callback, QoSProfile(depth=10, reliability=ReliabilityPolicy.BEST_EFFORT))
| obstacle_avoid.yaml_data = yaml.safe_load(file) |
Open the YAML file and load its contents.
| str obstacle_avoid.yaml_file_path = "room_map_save.yaml" |