你的浏览器禁用了JavaScript, 请开启后刷新浏览器获得更好的体验!
输入关键字进行搜索
搜索:
没有找到相关结果
ddwy
赞同来自:
#include<ros/ros.h> #include<tf/transform_broadcaster.h> #include<nav_msgs/Odometry.h> #include<geometry_msgs/Twist.h> #include<iostream> void callback(const geometry_msgs::Twist& cmd_vel) { ROS_INFO("Received a /cmd_vel message!"); ROS_INFO("Linear Components:[%f,%f,%f]",cmd_vel.linear.x,cmd_vel.linear.y,cmd_vel.linear.z); ROS_INFO("Angular Components:[%f,%f,%f]",cmd_vel.angular.x,cmd_vel.angular.y,cmd_vel.angular.z); } int main(int argc, char** argv) { ros::init(argc, argv, "cmd_vel_listener"); ros::NodeHandle n; ros::Subscriber sub = n.subscribe("/turtle1/cmd_vel", 1000, callback); ros::spin(); return 1; }
要回复问题请先登录或注册
2 个回复
ddwy
赞同来自:
ddwy
赞同来自: