#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"
Go to the source code of this file.
#define MAX_ERRORS 5 |
Definition at line 26 of file Roboteq_Driver.cpp.
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.
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.
int enc_loop_div |
Definition at line 30 of file Roboteq_Driver.cpp.
Definition at line 68 of file Roboteq_Driver.cpp.
int encoder_cpr |
Definition at line 31 of file Roboteq_Driver.cpp.
int encoder_ppr |
Definition at line 31 of file Roboteq_Driver.cpp.
Definition at line 39 of file Roboteq_Driver.cpp.
double encoders_loop_rate |
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.
double motors_loop_rate |
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.