delphyne
CarVisApplicator< T > Class Template Reference

Detailed Description

template<typename T>
class delphyne::CarVisApplicator< T >

CarVisApplicator takes as input a PoseVector containing vehicle poses.

For each vehicle, it outputs the poses of all visual geometries associated with the vehicle's visualization.

Prior to instantiating this system's drake::systems::Context and drake::systems::SystemOutput, a CarVis object must be provided for each vehicle in the simulation using AddCarVis().

This system is stateless and is direct feed-through.

Input port getters:

  • get_car_poses_input_port() - Contains a PoseBundle of every vehicle's pose in the world frame (i.e., X_WM_W where W stands for "world" and M stands for "Model"). The vehicle IDs and names contained within this PoseBundle must match the IDs and names contained within the CarVis objects that were supplied via calls to AddCarVis().

Output port getters:

Instantiated templates for the following kinds of T's are provided:

  • double

They are already available to link against in the containing library.

#include <src/visualization/car_vis_applicator.h>

Inheritance diagram for CarVisApplicator< T >:
[legend]

Public Member Functions

 CarVisApplicator ()
 
 ~CarVisApplicator () override
 
const drake::systems::InputPort< T > & get_car_poses_input_port () const
 Returns the input port that contains the vehicle poses in the form of a PoseBundle. More...
 
const drake::systems::OutputPort< T > & get_visual_geometry_poses_output_port () const
 Returns the output port that contains the visual geometry poses of all vehicle visualizations. More...
 
void AddCarVis (std::unique_ptr< CarVis< T >> vis)
 Adds a CarVis object for a vehicle. More...
 
drake::lcmt_viewer_load_robot get_load_robot_message () const
 Returns an lcmt_viewer_load_robot message containing the geometries of the bodies being visualized. More...
 
int num_cars () const
 Returns the number vehicles being visualized. More...
 
int num_vis_poses () const
 Returns the total number of poses of bodies being visualized. More...
 

Constructor & Destructor Documentation

◆ CarVisApplicator()

◆ ~CarVisApplicator()

~CarVisApplicator ( )
override

Member Function Documentation

◆ AddCarVis()

void AddCarVis ( std::unique_ptr< CarVis< T >>  vis)

Adds a CarVis object for a vehicle.

The ID returned by CarVis::id() must be unique among the CarVis objects added to this method. A std::runtime_error is thrown if the provided CarVis object's ID is a duplicate of a previously provided CarVis object's ID.

Precondition
The context for this system has not been created.

◆ get_car_poses_input_port()

const drake::systems::InputPort< T > & get_car_poses_input_port

Returns the input port that contains the vehicle poses in the form of a PoseBundle.

◆ get_load_robot_message()

drake::lcmt_viewer_load_robot get_load_robot_message

Returns an lcmt_viewer_load_robot message containing the geometries of the bodies being visualized.

◆ get_visual_geometry_poses_output_port()

const drake::systems::OutputPort< T > & get_visual_geometry_poses_output_port

Returns the output port that contains the visual geometry poses of all vehicle visualizations.

◆ num_cars()

int num_cars ( ) const

Returns the number vehicles being visualized.

◆ num_vis_poses()

int num_vis_poses

Returns the total number of poses of bodies being visualized.


The documentation for this class was generated from the following files: