#include <gazebo_rsv_balance.h>
Public Member Functions | |
GazeboRsvBalance () | |
void | Load (physics::ModelPtr _parent, sdf::ElementPtr _sdf) |
void | Reset () |
Called when Gazebo resets world. More... | |
~GazeboRsvBalance () | |
Protected Member Functions | |
virtual void | FiniChild () |
Called by gazebo upon exiting. More... | |
virtual void | UpdateChild () |
Gazebo step update. More... | |
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. More... | |
void | cmdVelCallback (const geometry_msgs::Twist::ConstPtr &cmd_msg) |
Callback to cmd_vel. More... | |
void | publishOdometry () |
Publishes odometry and desired tfs. More... | |
void | publishWheelJointState () |
Publishes wheel joint_states. More... | |
void | QueueThread () |
bool | resetOdom (std_srvs::Empty::Request &req) |
Service to reset odometry. More... | |
void | resetOdometry () |
Resets odometry by adding offset to WORLD odometry, and resetting odometry values. More... | |
bool | resetOverride (std_srvs::Empty::Request &req) |
Just exposes service. Not used in simulation. More... | |
void | resetVariables () |
Resets simulation variables. More... | |
bool | setInput (rsv_balance_msgs::SetInput::Request &req) |
Just exposes service. Not used in simulation. More... | |
bool | setMode (rsv_balance_msgs::SetMode::Request &req) |
Sets platform operating mode. More... | |
void | updateIMU () |
Gets pitch angle values directly from Gazebo world. More... | |
void | updateOdometry () |
Updates odometry, from Gazebo world or from encoders. More... | |
Gazebo Plugin which controls the balance platform just like the real thing.
Definition at line 45 of file gazebo_rsv_balance.h.
|
private |
Enumerator | |
---|---|
RIGHT | |
LEFT |
Definition at line 47 of file gazebo_rsv_balance.h.
|
private |
Enumerator | |
---|---|
PARK | |
TRACTOR | |
BALANCE |
Definition at line 57 of file gazebo_rsv_balance.h.
|
private |
Enumerator | |
---|---|
ENCODER | |
WORLD |
Definition at line 52 of file gazebo_rsv_balance.h.
gazebo::GazeboRsvBalance::GazeboRsvBalance | ( | ) |
Definition at line 19 of file gazebo_rsv_balance.cpp.
gazebo::GazeboRsvBalance::~GazeboRsvBalance | ( | ) |
Definition at line 21 of file gazebo_rsv_balance.cpp.
|
private |
Callback to cmd_tilt.
Definition at line 229 of file gazebo_rsv_balance.cpp.
|
private |
Callback to cmd_vel.
Definition at line 220 of file gazebo_rsv_balance.cpp.
|
protectedvirtual |
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.
|
private |
Publishes odometry and desired tfs.
Definition at line 302 of file gazebo_rsv_balance.cpp.
|
private |
Publishes wheel joint_states.
Definition at line 340 of file gazebo_rsv_balance.cpp.
|
private |
Definition at line 445 of file gazebo_rsv_balance.cpp.
void gazebo::GazeboRsvBalance::Reset | ( | ) |
Called when Gazebo resets world.
Definition at line 362 of file gazebo_rsv_balance.cpp.
|
private |
Service to reset odometry.
Definition at line 210 of file gazebo_rsv_balance.cpp.
|
private |
Resets odometry by adding offset to WORLD odometry, and resetting odometry values.
Definition at line 250 of file gazebo_rsv_balance.cpp.
|
private |
Just exposes service. Not used in simulation.
Definition at line 200 of file gazebo_rsv_balance.cpp.
|
private |
Resets simulation variables.
Used when starting and when gazebo reset world or model
Definition at line 153 of file gazebo_rsv_balance.cpp.
|
private |
Just exposes service. Not used in simulation.
Definition at line 190 of file gazebo_rsv_balance.cpp.
|
private |
Sets platform operating mode.
Definition at line 164 of file gazebo_rsv_balance.cpp.
|
protectedvirtual |
Gazebo step update.
Definition at line 378 of file gazebo_rsv_balance.cpp.
|
private |
Gets pitch angle values directly from Gazebo world.
Definition at line 237 of file gazebo_rsv_balance.cpp.
|
private |
Updates odometry, from Gazebo world or from encoders.
Definition at line 261 of file gazebo_rsv_balance.cpp.
|
private |
Definition at line 81 of file gazebo_rsv_balance.h.
|
private |
Definition at line 111 of file gazebo_rsv_balance.h.
|
private |
Definition at line 83 of file gazebo_rsv_balance.h.
|
private |
Definition at line 93 of file gazebo_rsv_balance.h.
|
private |
Definition at line 92 of file gazebo_rsv_balance.h.
|
private |
Definition at line 87 of file gazebo_rsv_balance.h.
|
private |
Definition at line 122 of file gazebo_rsv_balance.h.
|
private |
Definition at line 131 of file gazebo_rsv_balance.h.
|
private |
Definition at line 132 of file gazebo_rsv_balance.h.
|
private |
Definition at line 75 of file gazebo_rsv_balance.h.
|
private |
Definition at line 130 of file gazebo_rsv_balance.h.
|
private |
Definition at line 129 of file gazebo_rsv_balance.h.
|
private |
Definition at line 91 of file gazebo_rsv_balance.h.
|
private |
Definition at line 125 of file gazebo_rsv_balance.h.
|
private |
Definition at line 147 of file gazebo_rsv_balance.h.
|
private |
Definition at line 121 of file gazebo_rsv_balance.h.
|
private |
Definition at line 137 of file gazebo_rsv_balance.h.
|
private |
Definition at line 112 of file gazebo_rsv_balance.h.
|
private |
Definition at line 133 of file gazebo_rsv_balance.h.
|
private |
Definition at line 134 of file gazebo_rsv_balance.h.
|
private |
Definition at line 113 of file gazebo_rsv_balance.h.
|
private |
Definition at line 88 of file gazebo_rsv_balance.h.
|
private |
Definition at line 89 of file gazebo_rsv_balance.h.
|
private |
Definition at line 76 of file gazebo_rsv_balance.h.
|
private |
Definition at line 116 of file gazebo_rsv_balance.h.
|
private |
Definition at line 109 of file gazebo_rsv_balance.h.
|
private |
Definition at line 114 of file gazebo_rsv_balance.h.
|
private |
Definition at line 115 of file gazebo_rsv_balance.h.
|
private |
Definition at line 110 of file gazebo_rsv_balance.h.
|
private |
Definition at line 82 of file gazebo_rsv_balance.h.
|
private |
Definition at line 97 of file gazebo_rsv_balance.h.
|
private |
Definition at line 96 of file gazebo_rsv_balance.h.
|
private |
Definition at line 127 of file gazebo_rsv_balance.h.
|
private |
Definition at line 77 of file gazebo_rsv_balance.h.
|
private |
Definition at line 95 of file gazebo_rsv_balance.h.
|
private |
Definition at line 94 of file gazebo_rsv_balance.h.
|
private |
Definition at line 148 of file gazebo_rsv_balance.h.
|
private |
Definition at line 90 of file gazebo_rsv_balance.h.
|
private |
Definition at line 128 of file gazebo_rsv_balance.h.
|
private |
Definition at line 98 of file gazebo_rsv_balance.h.
|
private |
Definition at line 149 of file gazebo_rsv_balance.h.
|
private |
Definition at line 78 of file gazebo_rsv_balance.h.
|
private |
Definition at line 146 of file gazebo_rsv_balance.h.
|
private |
Definition at line 145 of file gazebo_rsv_balance.h.
|
private |
Definition at line 119 of file gazebo_rsv_balance.h.
|
private |
Definition at line 118 of file gazebo_rsv_balance.h.
|
private |
Definition at line 126 of file gazebo_rsv_balance.h.