Public Member Functions | Private Member Functions | Private Attributes
ArtVehicleModel Class Reference

#include <vehicle_model.h>

List of all members.

Public Member Functions

 ArtVehicleModel (Stg::ModelPosition *stgPos, tf::TransformBroadcaster *tfBroad, std::string ns_prefix)
void setup (void)
void update (ros::Time sim_time)
 ~ArtVehicleModel ()

Private Member Functions

void brakeReceived (const art_msgs::BrakeState::ConstPtr &msg)
void ModelAcceleration (geometry_msgs::Twist *odomVel, sensor_msgs::Imu *imu_msg, ros::Time sim_time)
void publishGPS (ros::Time sim_time)
void shifterReceived (const art_msgs::Shifter::ConstPtr &msg)
void steeringReceived (const art_msgs::SteeringState::ConstPtr &msg)
void throttleReceived (const art_msgs::ThrottleState::ConstPtr &msg)

Private Attributes

float brake_position_
ros::Subscriber brake_sub_
ros::Publisher gps_pub_
ros::Publisher ground_truth_pub_
nav_msgs::Odometry groundTruthMsg_
ros::Publisher imu_pub_
ros::Time last_update_time_
double map_origin_x_
double map_origin_y_
boost::mutex msg_lock_
ros::NodeHandle node_
std::string ns_prefix_
ros::Publisher odom_pub_
nav_msgs::Odometry odomMsg_
double origin_easting_
double origin_elev_
double origin_lat_
double origin_long_
double origin_northing_
char origin_zone_ [20]
uint8_t shifter_gear_
ros::Subscriber shifter_sub_
float steering_angle_
ros::Subscriber steering_sub_
Stg::ModelPosition * stgp_
tf::TransformBroadcastertf_
std::string tf_prefix_
float throttle_position_
ros::Subscriber throttle_sub_

Detailed Description

Definition at line 44 of file vehicle_model.h.


Constructor & Destructor Documentation

ArtVehicleModel::ArtVehicleModel ( Stg::ModelPosition *  stgPos,
tf::TransformBroadcaster tfBroad,
std::string  ns_prefix 
) [inline]

Definition at line 49 of file vehicle_model.h.

Definition at line 64 of file vehicle_model.h.


Member Function Documentation

Definition at line 92 of file vehicle_model.cc.

void ArtVehicleModel::ModelAcceleration ( geometry_msgs::Twist *  odomVel,
sensor_msgs::Imu *  imuMsg,
ros::Time  sim_time 
) [private]

Model vehicle acceleration

Precondition:
last_update_time_ = time of previous update.
Parameters:
odomVel[out]-> the Odometry message Twist component
imuMsg[out]-> the IMU message
sim_time[in]current simulation time
Note:
This simple model does not account for sideways slippage, so odomVel->linear.y is always zero. Similarly, roll, pitch and odomVel->linear.z are always zero, because Stage is a 2D simulation.
Todo:
introduce some small random fluctuations

Definition at line 137 of file vehicle_model.cc.

void ArtVehicleModel::publishGPS ( ros::Time  sim_time) [private]

Definition at line 273 of file vehicle_model.cc.

void ArtVehicleModel::setup ( void  )

Definition at line 33 of file vehicle_model.cc.

Definition at line 100 of file vehicle_model.cc.

Definition at line 108 of file vehicle_model.cc.

Definition at line 116 of file vehicle_model.cc.

void ArtVehicleModel::update ( ros::Time  sim_time)

Definition at line 197 of file vehicle_model.cc.


Member Data Documentation

Definition at line 110 of file vehicle_model.h.

Definition at line 94 of file vehicle_model.h.

Definition at line 91 of file vehicle_model.h.

Definition at line 87 of file vehicle_model.h.

nav_msgs::Odometry ArtVehicleModel::groundTruthMsg_ [private]

Definition at line 86 of file vehicle_model.h.

Definition at line 90 of file vehicle_model.h.

Definition at line 88 of file vehicle_model.h.

Definition at line 123 of file vehicle_model.h.

Definition at line 124 of file vehicle_model.h.

boost::mutex ArtVehicleModel::msg_lock_ [private]

Definition at line 109 of file vehicle_model.h.

Definition at line 79 of file vehicle_model.h.

std::string ArtVehicleModel::ns_prefix_ [private]

Definition at line 81 of file vehicle_model.h.

Definition at line 85 of file vehicle_model.h.

nav_msgs::Odometry ArtVehicleModel::odomMsg_ [private]

Definition at line 84 of file vehicle_model.h.

Definition at line 120 of file vehicle_model.h.

Definition at line 119 of file vehicle_model.h.

double ArtVehicleModel::origin_lat_ [private]

Definition at line 117 of file vehicle_model.h.

Definition at line 118 of file vehicle_model.h.

Definition at line 121 of file vehicle_model.h.

char ArtVehicleModel::origin_zone_[20] [private]

Definition at line 122 of file vehicle_model.h.

uint8_t ArtVehicleModel::shifter_gear_ [private]

Definition at line 111 of file vehicle_model.h.

Definition at line 95 of file vehicle_model.h.

Definition at line 112 of file vehicle_model.h.

Definition at line 96 of file vehicle_model.h.

Stg::ModelPosition* ArtVehicleModel::stgp_ [private]

Definition at line 76 of file vehicle_model.h.

Definition at line 80 of file vehicle_model.h.

std::string ArtVehicleModel::tf_prefix_ [private]

Definition at line 82 of file vehicle_model.h.

Definition at line 113 of file vehicle_model.h.

Definition at line 97 of file vehicle_model.h.


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


simulator_art
Author(s): Jack O'Quin
autogenerated on Fri Jan 3 2014 11:08:28