32 #include <gtest/gtest.h> 36 #include <geometry_msgs/Twist.h> 37 #include <four_wheel_steering_msgs/FourWheelSteering.h> 38 #include <nav_msgs/Odometry.h> 41 #include <std_srvs/Empty.h> 44 const double EPS = 0.01;
71 void publish(geometry_msgs::Twist cmd_vel)
75 void publish_4ws(four_wheel_steering_msgs::FourWheelSteering cmd_vel)
95 FAIL() <<
"Something went wrong while executing test.";
106 FAIL() <<
"Something went wrong while executing test.";
121 ROS_INFO_STREAM(
"Callback reveived: pos.x: " << odom.pose.pose.position.x
122 <<
", orient.z: " << odom.pose.pose.orientation.z
123 <<
", lin_est: " << odom.twist.twist.linear.x
124 <<
", ang_est: " << odom.twist.twist.angular.z);
126 received_first_odom =
true;
ros::ServiceClient stop_srv
void publish_4ws(four_wheel_steering_msgs::FourWheelSteering cmd_vel)
#define ROS_DEBUG_STREAM_THROTTLE(rate, args)
void publish(geometry_msgs::Twist cmd_vel)
void publish(const boost::shared_ptr< M > &message) const
ServiceClient serviceClient(ros::NodeHandle n, std::string name)
const double VELOCITY_TOLERANCE
bool call(MReq &req, MRes &res)
FourWheelSteeringControllerTest()
nav_msgs::Odometry last_odom
tf::Quaternion tfQuatFromGeomQuat(const geometry_msgs::Quaternion &quat)
ros::Publisher cmd_twist_pub
const double JERK_ANGULAR_VELOCITY_TOLERANCE
bool hasReceivedFirstOdom() const
void waitForController() const
void odomCallback(const nav_msgs::Odometry &odom)
uint32_t getNumPublishers() const
bool isControllerAlive() const
const double JERK_LINEAR_VELOCITY_TOLERANCE
uint32_t getNumSubscribers() const
#define ROS_INFO_STREAM(args)
~FourWheelSteeringControllerTest()
const double ORIENTATION_TOLERANCE
nav_msgs::Odometry getLastOdom()
ros::ServiceClient start_srv
const double POSITION_TOLERANCE
ros::Publisher cmd_4ws_pub
void waitForOdomMsgs() const