23 #include <boost/thread/recursive_mutex.hpp> 26 #include <geometry_msgs/Twist.h> 27 #include <sensor_msgs/Imu.h> 28 #include <sensor_msgs/LaserScan.h> 29 #include <nav_msgs/Odometry.h> 32 int main(
int argc,
char** argv)
34 ros::init(argc, argv,
"base_calibration_node");
45 nh.
param<
bool>(
"verbose", verbose, verbose);
48 b.
spin(0.5, 1, verbose);
49 b.
spin(1.5, 1, verbose);
50 b.
spin(3.0, 2, verbose);
51 b.
spin(-0.5, 1, verbose);
52 b.
spin(-1.5, 1, verbose);
53 b.
spin(-3.0, 2, verbose);
62 std::time_t
t = std::time(NULL);
63 std::strftime(datecode, 80,
"%Y_%m_%d_%H_%M_%S", std::localtime(&t));
65 std::stringstream yaml_name;
66 yaml_name <<
"/tmp/base_calibration_" << datecode <<
".yaml";
68 file.open(yaml_name.str().c_str());
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
geometry_msgs::TransformStamped t
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
bool spin(double velocity, int rotations, bool verbose=false)
Spin and record imu, odom, scan.
Class for moving the base around and calibrating imu and odometry.
int main(int argc, char **argv)
void clearMessages()
Clear any received messages.
std::string printCalibrationData()
Print out the calibration data.