sim.world_gen.world_node#
Classes#
Abstract base class for world generation nodes. |
Module Contents#
- class WorldNode(node_name: str)#
Bases:
rclpy.node.Node,abc.ABCAbstract base class for world generation nodes.
Each competition should have a WorldNode implementation that generates generates each world at runtime by spawning in the correct entities.
Should implement any topics/services for world data
- world: str#
- stage: str#
- sim_params#
- rng#
- trigger_srv#
- spawn_entity_client#
- spawn_entity(entity: sim.world_gen.entity.Entity) bool#
- spawn_entities(entities: list[sim.world_gen.entity.Entity]) bool#
- _wait_for_spawn_service(timeout_sec: float = 10.0) bool#
- _log_spawn_result(name: str, future) None#
- generate_world_callback(request, response)#
- abstractmethod generate_world() bool#
Generate the world file and write it to self.output_path.
This method should: 1. Generate world entities/obstacles based on competition parameters as Entity objects 2. Dynamically load in the entities through the ros_gz entity create bridge 3. Store any world metadata needed for services/topics
return True if dynamic generation is successful, False otherwise
- set_physics(world: xml.etree.ElementTree.Element, physics: dict) None#
Set the physics of the ground plane in the world.