delphyne
|
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:
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:
They are already available to link against in the containing library.
#include <src/visualization/car_vis_applicator.h>
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... | |
|
override |
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.
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.
drake::lcmt_viewer_load_robot get_load_robot_message |
Returns an lcmt_viewer_load_robot message containing the geometries of the bodies being visualized.
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.
int num_cars | ( | ) | const |
Returns the number vehicles being visualized.
int num_vis_poses |
Returns the total number of poses of bodies being visualized.