1. 可显示的数据类型
参考:维基百科有更加详细的说明,还有配套的教学视频,不过得翻墙才能看。
2. nav_msgs/Odometry
2.1 在rviz上添加 nav_msgs/Odometry
但是还不知道covriance协方差该怎么设置,以及有什么实际性意义。
2.1 使用rosmsg info nav_msgs/Odometry查看这种结构体消息的内容
包含以下内容
zjj@Galaxy:~$ rosmsg info nav_msgs/Odometry
std_msgs/Header header
uint32 seq
time stamp
string frame_id
string child_frame_id
geometry_msgs/PoseWithCovariance pose
geometry_msgs/Pose pose
geometry_msgs/Point position
float64 x
float64 y
float64 z
geometry_msgs/Quaternion orientation
float64 x
float64 y
float64 z
float64 w
float64[36] covariance
geometry_msgs/TwistWithCovariance twist
geometry_msgs/Twist twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z
float64[36] covariance
其中关于frame_id和child_frame_id在rviz里面表示的意义还不是特别懂。
3. visualization_msgs::MarkerArray 和 visualization_msgs::Marker的区别
简而言之: MarkerArray 是指向元素为Marker的容器的指针。其余就没有区别了。
首先是 visualization_msgs::MarkerArray 的数据类型如下所示:
visualization_msgs/Marker[] markers uint8 ARROW=0 uint8 CUBE=1 uint8 SPHERE=2 uint8 CYLINDER=3 uint8 LINE_STRIP=4 uint8 LINE_LIST=5 uint8 CUBE_LIST=6 uint8 SPHERE_LIST=7 uint8 POINTS=8 uint8 TEXT_VIEW_FACING=9 uint8 MESH_RESOURCE=10 uint8 TRIANGLE_LIST=11 uint8 ADD=0 uint8 MODIFY=0 uint8 DELETE=2 uint8 DELETEALL=3 std_msgs/Header header uint32 seq time stamp string frame_id string ns int32 id int32 type int32 action geometry_msgs/Pose pose geometry_msgs/Point position float64 x float64 y float64 z geometry_msgs/Quaternion orientation float64 x float64 y float64 z float64 w geometry_msgs/Vector3 scale float64 x float64 y float64 z std_msgs/ColorRGBA color float32 r float32 g float32 b float32 a duration lifetime bool frame_locked geometry_msgs/Point[] points float64 x float64 y float64 z std_msgs/ColorRGBA[] colors float32 r float32 g float32 b float32 a string text string mesh_resource bool mesh_use_embedded_materials
其次是 visualization_msgs::Marker
uint8 ARROW=0 uint8 CUBE=1 uint8 SPHERE=2 uint8 CYLINDER=3 uint8 LINE_STRIP=4 uint8 LINE_LIST=5 uint8 CUBE_LIST=6 uint8 SPHERE_LIST=7 uint8 POINTS=8 uint8 TEXT_VIEW_FACING=9 uint8 MESH_RESOURCE=10 uint8 TRIANGLE_LIST=11 uint8 ADD=0 uint8 MODIFY=0 uint8 DELETE=2 uint8 DELETEALL=3 std_msgs/Header header uint32 seq time stamp string frame_id string ns int32 id int32 type int32 action geometry_msgs/Pose pose geometry_msgs/Point position float64 x float64 y float64 z geometry_msgs/Quaternion orientation float64 x float64 y float64 z float64 w geometry_msgs/Vector3 scale float64 x float64 y float64 z std_msgs/ColorRGBA color float32 r float32 g float32 b float32 a duration lifetime bool frame_locked geometry_msgs/Point[] points float64 x float64 y float64 z std_msgs/ColorRGBA[] colors float32 r float32 g float32 b float32 a string text string mesh_resource bool mesh_use_embedded_materials