47 #include <Box2D/Box2D.h> 48 #include <flatland_plugins/update_timer.h> 49 #include <flatland_server/model_plugin.h> 50 #include <flatland_server/timekeeper.h> 51 #include <geometry_msgs/Twist.h> 52 #include <nav_msgs/Odometry.h> 54 #ifndef FLATLAND_PLUGINS_TRICYCLE_DRIVE_H 55 #define FLATLAND_PLUGINS_TRICYCLE_DRIVE_H 76 geometry_msgs::Twist twist_msg_;
77 nav_msgs::Odometry odom_msg_;
78 nav_msgs::Odometry ground_truth_msg_;
79 ros::Subscriber twist_sub_;
80 ros::Publisher odom_pub_;
81 ros::Publisher ground_truth_pub_;
85 default_random_engine rng_;
86 array<normal_distribution<double>, 6> noise_gen_;
93 void OnInitialize(
const YAML::Node& config)
override;
106 void BeforePhysicsStep(
const Timekeeper& timekeeper)
override;
113 void TwistCallback(
const geometry_msgs::Twist& msg);
bool invert_steering_angle_
whether to invert steering angle
Definition: tricycle_drive.h:71
Joint * rear_right_wj_
rear right wheel joint
Definition: tricycle_drive.h:67
double axel_track_
normal distrance between the rear two wheels
Definition: tricycle_drive.h:68
Definition: dummy_model_plugin.h:59
double wheelbase_
distance between the front and rear wheel
Definition: tricycle_drive.h:69
Joint * front_wj_
front wheel joint
Definition: tricycle_drive.h:65
Definition: tricycle_drive.h:62
b2Vec2 rear_center_
middle point between the two rear wheels
Definition: tricycle_drive.h:70
Definition: timekeeper.h:55
Definition: model_plugin.h:64
double max_angular_velocity_
The max angular velocity.
Definition: tricycle_drive.h:72
double theta_f_
The current angular offset of the front wheel.
Definition: tricycle_drive.h:74
Joint * rear_left_wj_
rear left wheel joint
Definition: tricycle_drive.h:66
Definition: update_timer.h:55
double target_wheel_angle_
The current target wheel angle.
Definition: tricycle_drive.h:73