Defines | Functions | Variables
Roboteq_Driver.cpp File Reference
#include <string>
#include <string.h>
#include "RoboteqDevice.h"
#include "ErrorCodes.h"
#include "Constants.h"
#include "ros/ros.h"
#include "geometry_msgs/Twist.h"
#include "komodo_rover/StampedEncoders.h"
#include "nav_msgs/Odometry.h"
#include "tf/tf.h"
#include <tf/transform_broadcaster.h>
#include <cmath>
#include <iostream>
#include <stdio.h>
#include <std_srvs/Empty.h>
#include "sensor_msgs/Imu.h"
#include "tf/transform_datatypes.h"
#include "std_msgs/Float32.h"
Include dependency graph for Roboteq_Driver.cpp:

Go to the source code of this file.

Defines

#define MAX_ERRORS   5

Functions

void cmd_velCallback (const geometry_msgs::Twist::ConstPtr &msg)
void controlLoop ()
void imu_Callback (const sensor_msgs::Imu::ConstPtr &msg)
int main (int argc, char **argv)
void queryBat ()
void queryEncoders ()
void updtae_state ()
double wrapToPi (double angle)
bool zero_enc_callback (std_srvs::Empty::Request &request, std_srvs::Empty::Response &response)

Variables

ros::Time bat_loop_time
RoboteqDevice device
int enc_error_count = 0
int enc_loop_count = 0
int enc_loop_div
ros::Time enc_loop_time
int encoder_cpr
int encoder_ppr
ros::Publisher encoder_pub
double encoders_loop_rate
bool first_enc_read = true
int l_encoder = 0
int l_encoder_init = 0
double Left_Motor_command = 0
int mot_error_count = 0
ros::Time mot_loop_time
double motors_loop_rate
tf::TransformBroadcasterodom_broadcaster
std::string odom_frame_id
ros::Publisher odom_pub
double pos_cov = 0.0
int prev_l_encoder = 0
int prev_r_encoder = 0
ros::Time prev_time
geometry_msgs::Quaternion q_imu = tf::createQuaternionMsgFromYaw(0)
int r_encoder = 0
int r_encoder_init = 0
double Right_Motor_command = 0
double rot_cov = 0.0
ros::Publisher rover_bat_pub
bool rp_from_imu = true
int rpm_limit
int status = -1
double target_direction = 0.0
double target_speed = 0.0
double tf_loop_rate
ros::Time tf_loop_time
double tt = 0
double wheel_base_length = 0.0
double wheel_circumference = 0.0
double wheel_diameter = 0.0
double xx = 0
bool y_from_imu = true
double yy = 0

Define Documentation

#define MAX_ERRORS   5

Definition at line 26 of file Roboteq_Driver.cpp.


Function Documentation

void cmd_velCallback ( const geometry_msgs::Twist::ConstPtr &  msg)

Definition at line 83 of file Roboteq_Driver.cpp.

void controlLoop ( )

Definition at line 110 of file Roboteq_Driver.cpp.

void imu_Callback ( const sensor_msgs::Imu::ConstPtr &  msg)

Definition at line 308 of file Roboteq_Driver.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 318 of file Roboteq_Driver.cpp.

void queryBat ( )

Definition at line 132 of file Roboteq_Driver.cpp.

void queryEncoders ( )

Definition at line 152 of file Roboteq_Driver.cpp.

void updtae_state ( )

Definition at line 189 of file Roboteq_Driver.cpp.

double wrapToPi ( double  angle)

Definition at line 72 of file Roboteq_Driver.cpp.

bool zero_enc_callback ( std_srvs::Empty::Request &  request,
std_srvs::Empty::Response &  response 
)

Definition at line 300 of file Roboteq_Driver.cpp.


Variable Documentation

Definition at line 68 of file Roboteq_Driver.cpp.

Definition at line 24 of file Roboteq_Driver.cpp.

int enc_error_count = 0

Definition at line 56 of file Roboteq_Driver.cpp.

int enc_loop_count = 0

Definition at line 30 of file Roboteq_Driver.cpp.

Definition at line 30 of file Roboteq_Driver.cpp.

Definition at line 68 of file Roboteq_Driver.cpp.

Definition at line 31 of file Roboteq_Driver.cpp.

Definition at line 31 of file Roboteq_Driver.cpp.

Definition at line 39 of file Roboteq_Driver.cpp.

Definition at line 53 of file Roboteq_Driver.cpp.

bool first_enc_read = true

Definition at line 35 of file Roboteq_Driver.cpp.

int l_encoder = 0

Definition at line 46 of file Roboteq_Driver.cpp.

int l_encoder_init = 0

Definition at line 34 of file Roboteq_Driver.cpp.

double Left_Motor_command = 0

Definition at line 36 of file Roboteq_Driver.cpp.

int mot_error_count = 0

Definition at line 57 of file Roboteq_Driver.cpp.

Definition at line 68 of file Roboteq_Driver.cpp.

Definition at line 52 of file Roboteq_Driver.cpp.

Definition at line 40 of file Roboteq_Driver.cpp.

std::string odom_frame_id

Definition at line 55 of file Roboteq_Driver.cpp.

Definition at line 38 of file Roboteq_Driver.cpp.

double pos_cov = 0.0

Definition at line 62 of file Roboteq_Driver.cpp.

int prev_l_encoder = 0

Definition at line 33 of file Roboteq_Driver.cpp.

int prev_r_encoder = 0

Definition at line 33 of file Roboteq_Driver.cpp.

Definition at line 68 of file Roboteq_Driver.cpp.

geometry_msgs::Quaternion q_imu = tf::createQuaternionMsgFromYaw(0)

Definition at line 44 of file Roboteq_Driver.cpp.

int r_encoder = 0

Definition at line 47 of file Roboteq_Driver.cpp.

int r_encoder_init = 0

Definition at line 34 of file Roboteq_Driver.cpp.

double Right_Motor_command = 0

Definition at line 37 of file Roboteq_Driver.cpp.

double rot_cov = 0.0

Definition at line 61 of file Roboteq_Driver.cpp.

Definition at line 22 of file Roboteq_Driver.cpp.

bool rp_from_imu = true

Definition at line 28 of file Roboteq_Driver.cpp.

int rpm_limit

Definition at line 64 of file Roboteq_Driver.cpp.

int status = -1

Definition at line 32 of file Roboteq_Driver.cpp.

double target_direction = 0.0

Definition at line 59 of file Roboteq_Driver.cpp.

double target_speed = 0.0

Definition at line 58 of file Roboteq_Driver.cpp.

double tf_loop_rate

Definition at line 54 of file Roboteq_Driver.cpp.

Definition at line 68 of file Roboteq_Driver.cpp.

double tt = 0

Definition at line 67 of file Roboteq_Driver.cpp.

double wheel_base_length = 0.0

Definition at line 50 of file Roboteq_Driver.cpp.

double wheel_circumference = 0.0

Definition at line 49 of file Roboteq_Driver.cpp.

double wheel_diameter = 0.0

Definition at line 51 of file Roboteq_Driver.cpp.

double xx = 0

Definition at line 67 of file Roboteq_Driver.cpp.

bool y_from_imu = true

Definition at line 29 of file Roboteq_Driver.cpp.

double yy = 0

Definition at line 67 of file Roboteq_Driver.cpp.



komodo_rover
Author(s): RoboTiCan
autogenerated on Tue Jan 7 2014 11:20:12