Go to the documentation of this file.
35 #include <gtest/gtest.h>
39 #include <geometry_msgs/Twist.h>
40 #include <four_wheel_steering_msgs/FourWheelSteering.h>
41 #include <nav_msgs/Odometry.h>
44 #include <std_srvs/Empty.h>
47 const double EPS = 0.01;
74 void publish(geometry_msgs::Twist cmd_vel)
78 void publish_4ws(four_wheel_steering_msgs::FourWheelSteering cmd_vel)
98 FAIL() <<
"Something went wrong while executing test.";
109 FAIL() <<
"Something went wrong while executing test.";
124 ROS_INFO_STREAM(
"Callback reveived: pos.x: " << odom.pose.pose.position.x
125 <<
", orient.z: " << odom.pose.pose.orientation.z
126 <<
", lin_est: " << odom.twist.twist.linear.x
127 <<
", ang_est: " << odom.twist.twist.angular.z);
ros::Publisher cmd_4ws_pub
ros::ServiceClient stop_srv
nav_msgs::Odometry getLastOdom()
ServiceClient serviceClient(ros::NodeHandle n, std::string name)
ros::Publisher cmd_twist_pub
nav_msgs::Odometry last_odom
void waitForOdomMsgs() const
void publish(const boost::shared_ptr< M > &message) const
uint32_t getNumPublishers() const
void publish(geometry_msgs::Twist cmd_vel)
tf::Quaternion tfQuatFromGeomQuat(const geometry_msgs::Quaternion &quat)
const double JERK_ANGULAR_VELOCITY_TOLERANCE
#define ROS_DEBUG_STREAM_THROTTLE(period, args)
#define ROS_INFO_STREAM(args)
void publish_4ws(four_wheel_steering_msgs::FourWheelSteering cmd_vel)
FourWheelSteeringControllerTest()
void odomCallback(const nav_msgs::Odometry &odom)
bool call(const MReq &req, MRes &resp, const std::string &service_md5sum)
ros::ServiceClient start_srv
~FourWheelSteeringControllerTest()
uint32_t getNumSubscribers() const
bool hasReceivedFirstOdom() const
bool isControllerAlive() const
const double JERK_LINEAR_VELOCITY_TOLERANCE
void waitForController() const
const double VELOCITY_TOLERANCE
const double ORIENTATION_TOLERANCE
const double POSITION_TOLERANCE