TurtleBot3 Waffle Pi Gazebo仿真角速度波动导致不稳定的技术咨询
TurtleBot3 Waffle Pi Gazebo仿真角速度波动导致不稳定的技术咨询
大家好,我现在遇到一个仿真相关的问题,想跟各位请教一下:我正在用Ubuntu 20.04搭配Gazebo 11.14做TurtleBot3 Waffle Pi机器人的仿真,运行了一段代码来记录/odom话题的命令数据和里程计数据,但目前机器人的角速度波动特别大,导致整个仿真运行很不稳定。
下面是我运行的代码片段:
#include "ros/ros.h" #include <Eigen/Core> #include <Eigen/Dense> #include <iostream> #include "nav_msgs/Path.h" #include "nav_msgs/Odometry.h" #include <tf2_ros/buffer.h> #include <tf2/LinearMath/Matrix3x3.h> #include "tf2_ros/transform_listener.h" #include "tf2_geometry_msgs/tf2_geometry_msgs.h" #include "narrow_space_navigation/point_style.h" #include "narrow_space_navigation/utils.h" #include <random> Controller::car_state cur_pose; void odom_callback(const nav_msgs::Odometry::ConstPtr &msg) { try { geometry_msgs::Quaternion odom_quat = msg->pose.pose.orientation; tf2::Quaternion quat; tf2::fromMsg(odom_quat, quat); // 后续处理逻辑省略 } catch (tf2::TransformException &ex) { ROS_WARN("%s", ex.what()); ros::Duration(1.0).sleep(); } }
我已经排查了一些基础配置,但还没找到问题根源,有没有朋友遇到过类似情况,或者能给一些排查方向的建议呀?
备注:内容来源于stack exchange,提问作者occupymars
相关产品推荐
相关产品推荐

