simulation.src.simulation_groundtruth.src.groundtruth.node module¶
Summary¶
Classes:
ROS node providing services to access the road’s groundtruth. |
|
Small wrapper class to easily create ROS services that offer LabeledPolygonMsgs. |
Reference¶
-
class
LabeledPolygonService(topic: str, callback: Callable[[id], List[simulation_groundtruth.msg._LabeledPolygon.LabeledPolygon]])[source]¶ Bases:
objectSmall wrapper class to easily create ROS services that offer LabeledPolygonMsgs.
-
topic: str¶
-
callback: Callable[[id], List[simulation_groundtruth.msg._LabeledPolygon.LabeledPolygon]]¶
-
-
class
GroundtruthNode(name='groundtruth_node', log_level=2)[source]¶ Bases:
simulation.utils.ros_base.node_base.NodeBaseROS node providing services to access the road’s groundtruth.
-
groundtruth¶ Stores road sections and allows to access groundtruth information.
- Type
-
object_controller¶ Create and track objects (e.g. obstacles, signs) in Gazebo.
- Type
-
section_srv¶ ROS service to access section ids and types.
- Type
rospy.Service
-
lane_srv¶ ROS service to access the lanes of a road section.
- Type
rospy.Service
-
obstacle_srv¶ ROS service to access obstacles in a road section.
- Type
rospy.Service
-
parking_srv¶ ROS service to access parking spots and other parking information.
- Type
rospy.Service
-
surface_marking_srv¶ ROS service to access surface markings in a road section.
- Type
rospy.Service
-
intersection_srv¶ ROS service to access information of an intersection.
- Type
rospy.Service
-
_load_road() → simulation.utils.road.road.Road[source]¶ Load road sections from current road.
-
_ensure_gazebo_startup()[source]¶ Make sure that gazebo is correctly launched.
Waiting for Gazebo is not as easy as it should be. This function, however, is a workaround. It attempts to spawn a model until it is there. Once the model has been spawned, it is directly removed again. At this point, Gazebo has been completely launched.
Beware: The model has no collision box and is not visible. It is therefore not problematic if it is not correctly removed!
-
get_sections(request: simulation_groundtruth.srv._SectionSrv.SectionSrvRequest) → simulation_groundtruth.srv._SectionSrv.SectionSrvResponse[source]¶ Answer section service request.
-
get_lanes(request: simulation_groundtruth.srv._LaneSrv.LaneSrvRequest) → simulation_groundtruth.srv._LaneSrv.LaneSrvResponse[source]¶ Answer lane service request.
-
get_parking(request: simulation_groundtruth.srv._ParkingSrv.ParkingSrvRequest) → simulation_groundtruth.srv._ParkingSrv.ParkingSrvResponse[source]¶ Answer parking service request.
-
get_intersection(request: simulation_groundtruth.srv._IntersectionSrv.IntersectionSrvRequest) → simulation_groundtruth.srv._IntersectionSrv.IntersectionSrvResponse[source]¶ Answer intersection service request.
-
_spawn_model(model_xml: str)[source]¶ Spawn a model in Gazebo.
- Parameters
model_xml – XML String that defines the model. (Without sdf declaration!)
-
_remove_model(name)[source]¶ Remove a model from Gazebo.
- Parameters
name – Name of the model in Gazebo.
-