Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes
gazebo::GazeboRsvBalance Class Reference

#include <gazebo_rsv_balance.h>

List of all members.

Public Member Functions

 GazeboRsvBalance ()
void Load (physics::ModelPtr _parent, sdf::ElementPtr _sdf)
void Reset ()
 Called when Gazebo resets world.
 ~GazeboRsvBalance ()

Protected Member Functions

virtual void FiniChild ()
 Called by gazebo upon exiting.
virtual void UpdateChild ()
 Gazebo step update.

Private Types

enum  { RIGHT, LEFT }
enum  Mode { PARK = rsv_balance_msgs::SetModeRequest::PARK, TRACTOR = rsv_balance_msgs::SetModeRequest::TRACTOR, BALANCE = rsv_balance_msgs::SetModeRequest::BALANCE }
enum  OdomSource { ENCODER = 0, WORLD = 1 }

Private Member Functions

void cmdTiltCallback (const std_msgs::Float64::ConstPtr &cmd_tilt)
 Callback to cmd_tilt.
void cmdVelCallback (const geometry_msgs::Twist::ConstPtr &cmd_msg)
 Callback to cmd_vel.
void publishOdometry ()
 Publishes odometry and desired tfs.
void publishWheelJointState ()
 Publishes wheel joint_states.
void QueueThread ()
bool resetOdom (std_srvs::Empty::Request &req)
 Service to reset odometry.
void resetOdometry ()
 Resets odometry by adding offset to WORLD odometry, and resetting odometry values.
bool resetOverride (std_srvs::Empty::Request &req)
 Just exposes service. Not used in simulation.
void resetVariables ()
 Resets simulation variables.
bool setInput (rsv_balance_msgs::SetInput::Request &req)
 Just exposes service. Not used in simulation.
bool setMode (rsv_balance_msgs::SetMode::Request &req)
 Sets platform operating mode.
void updateIMU ()
 Gets pitch angle values directly from Gazebo world.
void updateOdometry ()
 Updates odometry, from Gazebo world or from encoders.

Private Attributes

bool alive_
std::string base_frame_id_
boost::thread callback_queue_thread_
ros::Subscriber cmd_tilt_subscriber_
ros::Subscriber cmd_vel_subscriber_
std::string command_topic_
Mode current_mode_
double feedback_v_
double feedback_w_
GazeboRosPtr gazebo_ros_
double imu_dpitch_
double imu_pitch_
ros::Publisher joint_state_publisher_
std::vector< physics::JointPtr > joints_
common::Time last_update_time_
std::map< std::string, Modemode_map_
nav_msgs::Odometry odom_
std::string odom_frame_id_
math::Vector3 odom_offset_pos_
math::Vector3 odom_offset_rot_
OdomSource odom_source_
std::string odom_topic_
ros::Publisher odometry_publisher_
physics::ModelPtr parent_
double publish_diagnostics_rate_
bool publish_odom_tf_
bool publish_state_
double publish_state_rate_
bool publish_wheel_joint_
ros::CallbackQueue queue_
ros::ServiceServer reset_odom_server_
ros::ServiceServer reset_override_server_
double rot_desired_
sdf::ElementPtr sdf_
ros::ServiceServer set_input_server_
ros::ServiceServer set_mode_server_
balance_control::BalanceControl state_control_
ros::Publisher state_publisher_
double tilt_desired_
boost::shared_ptr
< tf::TransformBroadcaster
transform_broadcaster_
double * u_control_
event::ConnectionPtr update_connection_
double update_period_
double update_rate_
double wheel_radius_
double wheel_separation_
double x_desired_

Detailed Description

Gazebo Plugin which controls the balance platform just like the real thing.

Definition at line 45 of file gazebo_rsv_balance.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
RIGHT 
LEFT 

Definition at line 47 of file gazebo_rsv_balance.h.

Enumerator:
PARK 
TRACTOR 
BALANCE 

Definition at line 57 of file gazebo_rsv_balance.h.

Enumerator:
ENCODER 
WORLD 

Definition at line 52 of file gazebo_rsv_balance.h.


Constructor & Destructor Documentation

Definition at line 19 of file gazebo_rsv_balance.cpp.

Definition at line 21 of file gazebo_rsv_balance.cpp.


Member Function Documentation

void gazebo::GazeboRsvBalance::cmdTiltCallback ( const std_msgs::Float64::ConstPtr &  cmd_tilt) [private]

Callback to cmd_tilt.

Definition at line 229 of file gazebo_rsv_balance.cpp.

void gazebo::GazeboRsvBalance::cmdVelCallback ( const geometry_msgs::Twist::ConstPtr &  cmd_msg) [private]

Callback to cmd_vel.

Definition at line 220 of file gazebo_rsv_balance.cpp.

void gazebo::GazeboRsvBalance::FiniChild ( ) [protected, virtual]

Called by gazebo upon exiting.

Definition at line 436 of file gazebo_rsv_balance.cpp.

void gazebo::GazeboRsvBalance::Load ( physics::ModelPtr  _parent,
sdf::ElementPtr  _sdf 
)

Definition at line 23 of file gazebo_rsv_balance.cpp.

Publishes odometry and desired tfs.

Todo:
User configurable covariance

Definition at line 302 of file gazebo_rsv_balance.cpp.

Publishes wheel joint_states.

Definition at line 340 of file gazebo_rsv_balance.cpp.

Definition at line 445 of file gazebo_rsv_balance.cpp.

Called when Gazebo resets world.

Definition at line 362 of file gazebo_rsv_balance.cpp.

bool gazebo::GazeboRsvBalance::resetOdom ( std_srvs::Empty::Request &  req) [private]

Service to reset odometry.

Definition at line 210 of file gazebo_rsv_balance.cpp.

Resets odometry by adding offset to WORLD odometry, and resetting odometry values.

Todo:
Actually implement it

Definition at line 250 of file gazebo_rsv_balance.cpp.

bool gazebo::GazeboRsvBalance::resetOverride ( std_srvs::Empty::Request &  req) [private]

Just exposes service. Not used in simulation.

Definition at line 200 of file gazebo_rsv_balance.cpp.

Resets simulation variables.

Used when starting and when gazebo reset world or model

Definition at line 153 of file gazebo_rsv_balance.cpp.

bool gazebo::GazeboRsvBalance::setInput ( rsv_balance_msgs::SetInput::Request &  req) [private]

Just exposes service. Not used in simulation.

Definition at line 190 of file gazebo_rsv_balance.cpp.

bool gazebo::GazeboRsvBalance::setMode ( rsv_balance_msgs::SetMode::Request &  req) [private]

Sets platform operating mode.

Definition at line 164 of file gazebo_rsv_balance.cpp.

void gazebo::GazeboRsvBalance::UpdateChild ( ) [protected, virtual]

Gazebo step update.

Definition at line 378 of file gazebo_rsv_balance.cpp.

Gets pitch angle values directly from Gazebo world.

Definition at line 237 of file gazebo_rsv_balance.cpp.

Updates odometry, from Gazebo world or from encoders.

Todo:
Implement encoder odometry

Definition at line 261 of file gazebo_rsv_balance.cpp.


Member Data Documentation

Definition at line 81 of file gazebo_rsv_balance.h.

Definition at line 111 of file gazebo_rsv_balance.h.

Definition at line 83 of file gazebo_rsv_balance.h.

Definition at line 93 of file gazebo_rsv_balance.h.

Definition at line 92 of file gazebo_rsv_balance.h.

Definition at line 87 of file gazebo_rsv_balance.h.

Definition at line 122 of file gazebo_rsv_balance.h.

Definition at line 131 of file gazebo_rsv_balance.h.

Definition at line 132 of file gazebo_rsv_balance.h.

Definition at line 75 of file gazebo_rsv_balance.h.

Definition at line 130 of file gazebo_rsv_balance.h.

Definition at line 129 of file gazebo_rsv_balance.h.

Definition at line 91 of file gazebo_rsv_balance.h.

std::vector<physics::JointPtr> gazebo::GazeboRsvBalance::joints_ [private]

Definition at line 125 of file gazebo_rsv_balance.h.

Definition at line 147 of file gazebo_rsv_balance.h.

std::map<std::string, Mode> gazebo::GazeboRsvBalance::mode_map_ [private]

Definition at line 121 of file gazebo_rsv_balance.h.

nav_msgs::Odometry gazebo::GazeboRsvBalance::odom_ [private]

Definition at line 137 of file gazebo_rsv_balance.h.

Definition at line 112 of file gazebo_rsv_balance.h.

Definition at line 133 of file gazebo_rsv_balance.h.

Definition at line 134 of file gazebo_rsv_balance.h.

Definition at line 113 of file gazebo_rsv_balance.h.

Definition at line 88 of file gazebo_rsv_balance.h.

Definition at line 89 of file gazebo_rsv_balance.h.

physics::ModelPtr gazebo::GazeboRsvBalance::parent_ [private]

Definition at line 76 of file gazebo_rsv_balance.h.

Definition at line 116 of file gazebo_rsv_balance.h.

Definition at line 109 of file gazebo_rsv_balance.h.

Definition at line 114 of file gazebo_rsv_balance.h.

Definition at line 115 of file gazebo_rsv_balance.h.

Definition at line 110 of file gazebo_rsv_balance.h.

Definition at line 82 of file gazebo_rsv_balance.h.

Definition at line 97 of file gazebo_rsv_balance.h.

Definition at line 96 of file gazebo_rsv_balance.h.

Definition at line 127 of file gazebo_rsv_balance.h.

sdf::ElementPtr gazebo::GazeboRsvBalance::sdf_ [private]

Definition at line 77 of file gazebo_rsv_balance.h.

Definition at line 95 of file gazebo_rsv_balance.h.

Definition at line 94 of file gazebo_rsv_balance.h.

Definition at line 148 of file gazebo_rsv_balance.h.

Definition at line 90 of file gazebo_rsv_balance.h.

Definition at line 128 of file gazebo_rsv_balance.h.

Definition at line 98 of file gazebo_rsv_balance.h.

Definition at line 149 of file gazebo_rsv_balance.h.

Definition at line 78 of file gazebo_rsv_balance.h.

Definition at line 146 of file gazebo_rsv_balance.h.

Definition at line 145 of file gazebo_rsv_balance.h.

Definition at line 119 of file gazebo_rsv_balance.h.

Definition at line 118 of file gazebo_rsv_balance.h.

Definition at line 126 of file gazebo_rsv_balance.h.


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


rsv_balance_gazebo
Author(s): Vitor Matos
autogenerated on Fri Feb 12 2016 00:23:36