delphyne
SimplePriusVis< T > Class Template Reference

Detailed Description

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

Note: this class is based on (aka copy-of) the PriusVis class in Drake https://github.com/RobotLocomotion/drake/blob/master/automotive/prius_vis.h.

SimplePriusVis displays a visualization of a 2015 Toyota Prius. It relies on media/prius/simple_prius.sdf and requires that this SDF file only contain one model instance that is not connected to the world.

This is a temporary workaround to use a simpler SDF model; ideally we would like to be able to parametrize the SDF used in PriusVis, but that is TBD.

#include <src/visualization/simple_prius_vis.h>

Inheritance diagram for SimplePriusVis< T >:
[legend]

Public Member Functions

 SimplePriusVis (int id, const std::string &name)
 
const std::vector< drake::lcmt_viewer_link_data > & GetVisElements () const override
 Returns the visualization elements. More...
 
drake::systems::rendering::PoseBundle< T > CalcPoses (const drake::Isometry3< T > &X_WM) const override
 Computes and returns the poses of the bodies that constitute the vehicle's visualization. More...
 
- Public Member Functions inherited from CarVis< T >
 CarVis (int id, const std::string &name)
 The constructor. More...
 
virtual ~CarVis ()
 
int id () const
 Returns the ID that was supplied to the constructor. More...
 
const std::string & name () const
 Returns the name that was supplied to the constructor. More...
 
int num_poses () const
 Returns the number of visualization geometry poses. More...
 

Static Public Attributes

static constexpr double kVisOffset {1.40948}
 Defines the distance between the visual model's origin and the middle of the rear axle. More...
 

Constructor & Destructor Documentation

◆ SimplePriusVis()

SimplePriusVis ( int  id,
const std::string &  name 
)

Member Function Documentation

◆ CalcPoses()

drake::systems::rendering::PoseBundle< T > CalcPoses ( const drake::Isometry3< T > &  X_WM) const
overridevirtual

Computes and returns the poses of the bodies that constitute the vehicle's visualization.

The provided X_WM is the pose of the vehicle model in the world frame. The origin of the model's frame is assumed to be in the middle of the vehicle's rear axle. The poses in the returned PoseBundle are for the visualization's elements, and are also in the world frame. The size of this bundle is the value returned by num_poses().

Implements CarVis< T >.

◆ GetVisElements()

const std::vector< drake::lcmt_viewer_link_data > & GetVisElements ( ) const
overridevirtual

Returns the visualization elements.

Implements CarVis< T >.

Member Data Documentation

◆ kVisOffset

constexpr double kVisOffset {1.40948}
staticconstexpr

Defines the distance between the visual model's origin and the middle of the rear axle.


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