when i want to see the topic of /vehicle_info/pose, there is no data of the result

asked 2021-09-30 21:09:49 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I download the gazebo of vehicle_sim from github who is yukkysaito https://github.com/yukkysaito/vehicle...

I use gazebo9 version, melodic, cpp

this is my question ---------------vehicle_info_publisher.cpp----------------

VehicleInfoPublisher::VehicleInfoPublisher() : nh_(""), pnh_("~") { client_ = nh_.serviceClient<gazebo_msgs::getlinkstate>("/gazebo/get_link_state"); vehicle_pose_pub_ = nh_.advertise<geometry_msgs::posestamped>("/vehicle_info/pose", 1, true); vehicle_vel_pub_ = nh_.advertise<std_msgs::float64>("/vehicle_info/velocity", 1, true); steering_angle_pub_ = nh_.advertise<std_msgs::float64>("/vehicle_info/steering_angle", 1, true); double publish_pose_rate; pnh_.param<double>("publish_pose_rate", publish_pose_rate, double(10.0)); pnh_.param<double>("wheel_radius", wheel_radius_, 0.341); pnh_.param("ns", ns_, std::string("autoware_gazebo")); publish_timer_ = nh_.createTimer(ros::Duration(1.0 / publish_pose_rate), &VehicleInfoPublisher::publishTimerCallback, this); odom_sub_ = nh_.subscribe("joint_states", 1, &VehicleInfoPublisher::jointStateCallback, this); }

} there are 3 topic of vehicle_info(pose, velocity, angle) but I can get data of velocity, angle except for pose data ^Cheader: seq: 27445 stamp: secs: 6863 nsecs: 773000000 frame_id: "base_link" pose: position: x: 0.0 y: 0.0 z: 0.0 orientation: x: 0.0 y: 0.0 z: 0.0 w: 0.0

  1. how can I get dat of pose?
  2. can i get gazebo topic? in detail, there is many topic in gazebo simulation and also i can see the data of vehicle pose by graph in gazebo how can i publish the topic of gazebo simulation?
edit retag flag offensive close merge delete