ros的rviz理解

1. 可显示的数据类型

参考:维基百科有更加详细的说明,还有配套的教学视频,不过得翻墙才能看。

[1].rviz/DisplayTypes - ROS Wiki


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

 4. 为什么Header文件如此重要?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值