Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
gazebo::GazeboRosDiffDrive Class Reference

#include <gazebo_ros_diff_drive.h>

Inheritance diagram for gazebo::GazeboRosDiffDrive:
Inheritance graph
[legend]

Public Member Functions

 GazeboRosDiffDrive ()
 
void Load (physics::ModelPtr _parent, sdf::ElementPtr _sdf)
 
void Reset ()
 
 ~GazeboRosDiffDrive ()
 

Protected Member Functions

virtual void FiniChild ()
 
virtual void UpdateChild ()
 

Private Types

enum  OdomSource { ENCODER = 0, WORLD = 1 }
 

Private Member Functions

void cmdVelCallback (const geometry_msgs::Twist::ConstPtr &cmd_msg)
 
void getWheelVelocities ()
 
void publishOdometry (double step_time)
 
void publishWheelJointState ()
 publishes the wheel tf's More...
 
void publishWheelTF ()
 
void QueueThread ()
 
void UpdateOdometryEncoder ()
 

Private Attributes

bool alive_
 
boost::thread callback_queue_thread_
 
ros::Subscriber cmd_vel_subscriber_
 
std::string command_topic_
 
GazeboRosPtr gazebo_ros_
 
sensor_msgs::JointState joint_state_
 
ros::Publisher joint_state_publisher_
 
std::vector< physics::JointPtr > joints_
 
common::Time last_odom_update_
 
common::Time last_update_time_
 
boost::mutex lock
 
nav_msgs::Odometry odom_
 
OdomSource odom_source_
 
std::string odometry_frame_
 
ros::Publisher odometry_publisher_
 
std::string odometry_topic_
 
physics::ModelPtr parent
 
geometry_msgs::Pose2D pose_encoder_
 
bool publish_tf_
 
bool publishOdomTF_
 
bool publishWheelJointState_
 
bool publishWheelTF_
 
ros::CallbackQueue queue_
 
std::string robot_base_frame_
 
std::string robot_namespace_
 
double rot_
 
std::string tf_prefix_
 
boost::shared_ptr< tf::TransformBroadcastertransform_broadcaster_
 
event::ConnectionPtr update_connection_
 
double update_period_
 
double update_rate_
 
double wheel_accel
 
double wheel_diameter_
 
double wheel_separation_
 
double wheel_speed_ [2]
 
double wheel_speed_instr_ [2]
 
double wheel_torque
 
double x_
 

Detailed Description

Definition at line 73 of file gazebo_ros_diff_drive.h.

Member Enumeration Documentation

◆ OdomSource

Enumerator
ENCODER 
WORLD 

Definition at line 75 of file gazebo_ros_diff_drive.h.

Constructor & Destructor Documentation

◆ GazeboRosDiffDrive()

gazebo::GazeboRosDiffDrive::GazeboRosDiffDrive ( )

Definition at line 75 of file gazebo_ros_diff_drive.cpp.

◆ ~GazeboRosDiffDrive()

gazebo::GazeboRosDiffDrive::~GazeboRosDiffDrive ( )

Definition at line 78 of file gazebo_ros_diff_drive.cpp.

Member Function Documentation

◆ cmdVelCallback()

void gazebo::GazeboRosDiffDrive::cmdVelCallback ( const geometry_msgs::Twist::ConstPtr &  cmd_msg)
private

Definition at line 335 of file gazebo_ros_diff_drive.cpp.

◆ FiniChild()

void gazebo::GazeboRosDiffDrive::FiniChild ( )
protectedvirtual

Definition at line 315 of file gazebo_ros_diff_drive.cpp.

◆ getWheelVelocities()

void gazebo::GazeboRosDiffDrive::getWheelVelocities ( )
private

Definition at line 324 of file gazebo_ros_diff_drive.cpp.

◆ Load()

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

Definition at line 84 of file gazebo_ros_diff_drive.cpp.

◆ publishOdometry()

void gazebo::GazeboRosDiffDrive::publishOdometry ( double  step_time)
private

Definition at line 402 of file gazebo_ros_diff_drive.cpp.

◆ publishWheelJointState()

void gazebo::GazeboRosDiffDrive::publishWheelJointState ( )
private

publishes the wheel tf's

Definition at line 199 of file gazebo_ros_diff_drive.cpp.

◆ publishWheelTF()

void gazebo::GazeboRosDiffDrive::publishWheelTF ( )
private

Definition at line 220 of file gazebo_ros_diff_drive.cpp.

◆ QueueThread()

void gazebo::GazeboRosDiffDrive::QueueThread ( )
private

Definition at line 342 of file gazebo_ros_diff_drive.cpp.

◆ Reset()

void gazebo::GazeboRosDiffDrive::Reset ( )

Definition at line 183 of file gazebo_ros_diff_drive.cpp.

◆ UpdateChild()

void gazebo::GazeboRosDiffDrive::UpdateChild ( )
protectedvirtual

Definition at line 244 of file gazebo_ros_diff_drive.cpp.

◆ UpdateOdometryEncoder()

void gazebo::GazeboRosDiffDrive::UpdateOdometryEncoder ( )
private

Definition at line 351 of file gazebo_ros_diff_drive.cpp.

Member Data Documentation

◆ alive_

bool gazebo::GazeboRosDiffDrive::alive_
private

Definition at line 138 of file gazebo_ros_diff_drive.h.

◆ callback_queue_thread_

boost::thread gazebo::GazeboRosDiffDrive::callback_queue_thread_
private

Definition at line 130 of file gazebo_ros_diff_drive.h.

◆ cmd_vel_subscriber_

ros::Subscriber gazebo::GazeboRosDiffDrive::cmd_vel_subscriber_
private

Definition at line 113 of file gazebo_ros_diff_drive.h.

◆ command_topic_

std::string gazebo::GazeboRosDiffDrive::command_topic_
private

Definition at line 123 of file gazebo_ros_diff_drive.h.

◆ gazebo_ros_

GazeboRosPtr gazebo::GazeboRosDiffDrive::gazebo_ros_
private

Definition at line 98 of file gazebo_ros_diff_drive.h.

◆ joint_state_

sensor_msgs::JointState gazebo::GazeboRosDiffDrive::joint_state_
private

Definition at line 115 of file gazebo_ros_diff_drive.h.

◆ joint_state_publisher_

ros::Publisher gazebo::GazeboRosDiffDrive::joint_state_publisher_
private

Definition at line 116 of file gazebo_ros_diff_drive.h.

◆ joints_

std::vector<physics::JointPtr> gazebo::GazeboRosDiffDrive::joints_
private

Definition at line 109 of file gazebo_ros_diff_drive.h.

◆ last_odom_update_

common::Time gazebo::GazeboRosDiffDrive::last_odom_update_
private

Definition at line 147 of file gazebo_ros_diff_drive.h.

◆ last_update_time_

common::Time gazebo::GazeboRosDiffDrive::last_update_time_
private

Definition at line 143 of file gazebo_ros_diff_drive.h.

◆ lock

boost::mutex gazebo::GazeboRosDiffDrive::lock
private

Definition at line 120 of file gazebo_ros_diff_drive.h.

◆ odom_

nav_msgs::Odometry gazebo::GazeboRosDiffDrive::odom_
private

Definition at line 117 of file gazebo_ros_diff_drive.h.

◆ odom_source_

OdomSource gazebo::GazeboRosDiffDrive::odom_source_
private

Definition at line 145 of file gazebo_ros_diff_drive.h.

◆ odometry_frame_

std::string gazebo::GazeboRosDiffDrive::odometry_frame_
private

Definition at line 125 of file gazebo_ros_diff_drive.h.

◆ odometry_publisher_

ros::Publisher gazebo::GazeboRosDiffDrive::odometry_publisher_
private

Definition at line 112 of file gazebo_ros_diff_drive.h.

◆ odometry_topic_

std::string gazebo::GazeboRosDiffDrive::odometry_topic_
private

Definition at line 124 of file gazebo_ros_diff_drive.h.

◆ parent

physics::ModelPtr gazebo::GazeboRosDiffDrive::parent
private

Definition at line 99 of file gazebo_ros_diff_drive.h.

◆ pose_encoder_

geometry_msgs::Pose2D gazebo::GazeboRosDiffDrive::pose_encoder_
private

Definition at line 146 of file gazebo_ros_diff_drive.h.

◆ publish_tf_

bool gazebo::GazeboRosDiffDrive::publish_tf_
private

Definition at line 127 of file gazebo_ros_diff_drive.h.

◆ publishOdomTF_

bool gazebo::GazeboRosDiffDrive::publishOdomTF_
private

Definition at line 151 of file gazebo_ros_diff_drive.h.

◆ publishWheelJointState_

bool gazebo::GazeboRosDiffDrive::publishWheelJointState_
private

Definition at line 152 of file gazebo_ros_diff_drive.h.

◆ publishWheelTF_

bool gazebo::GazeboRosDiffDrive::publishWheelTF_
private

Definition at line 150 of file gazebo_ros_diff_drive.h.

◆ queue_

ros::CallbackQueue gazebo::GazeboRosDiffDrive::queue_
private

Definition at line 129 of file gazebo_ros_diff_drive.h.

◆ robot_base_frame_

std::string gazebo::GazeboRosDiffDrive::robot_base_frame_
private

Definition at line 126 of file gazebo_ros_diff_drive.h.

◆ robot_namespace_

std::string gazebo::GazeboRosDiffDrive::robot_namespace_
private

Definition at line 122 of file gazebo_ros_diff_drive.h.

◆ rot_

double gazebo::GazeboRosDiffDrive::rot_
private

Definition at line 137 of file gazebo_ros_diff_drive.h.

◆ tf_prefix_

std::string gazebo::GazeboRosDiffDrive::tf_prefix_
private

Definition at line 118 of file gazebo_ros_diff_drive.h.

◆ transform_broadcaster_

boost::shared_ptr<tf::TransformBroadcaster> gazebo::GazeboRosDiffDrive::transform_broadcaster_
private

Definition at line 114 of file gazebo_ros_diff_drive.h.

◆ update_connection_

event::ConnectionPtr gazebo::GazeboRosDiffDrive::update_connection_
private

Definition at line 100 of file gazebo_ros_diff_drive.h.

◆ update_period_

double gazebo::GazeboRosDiffDrive::update_period_
private

Definition at line 142 of file gazebo_ros_diff_drive.h.

◆ update_rate_

double gazebo::GazeboRosDiffDrive::update_rate_
private

Definition at line 141 of file gazebo_ros_diff_drive.h.

◆ wheel_accel

double gazebo::GazeboRosDiffDrive::wheel_accel
private

Definition at line 106 of file gazebo_ros_diff_drive.h.

◆ wheel_diameter_

double gazebo::GazeboRosDiffDrive::wheel_diameter_
private

Definition at line 103 of file gazebo_ros_diff_drive.h.

◆ wheel_separation_

double gazebo::GazeboRosDiffDrive::wheel_separation_
private

Definition at line 102 of file gazebo_ros_diff_drive.h.

◆ wheel_speed_

double gazebo::GazeboRosDiffDrive::wheel_speed_[2]
private

Definition at line 105 of file gazebo_ros_diff_drive.h.

◆ wheel_speed_instr_

double gazebo::GazeboRosDiffDrive::wheel_speed_instr_[2]
private

Definition at line 107 of file gazebo_ros_diff_drive.h.

◆ wheel_torque

double gazebo::GazeboRosDiffDrive::wheel_torque
private

Definition at line 104 of file gazebo_ros_diff_drive.h.

◆ x_

double gazebo::GazeboRosDiffDrive::x_
private

Definition at line 136 of file gazebo_ros_diff_drive.h.


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


gazebo_plugins
Author(s): John Hsu
autogenerated on Thu Sep 5 2024 02:49:55