odom话题发表的是odom坐标系到base_link之间的转换关系,以及机器人的速度。其中base_like是机器人本体坐标系,与机器人中心重合,所以odom坐标系到base_link之间的转换关系也就是机器人在里程计坐标系中的位姿。
注:有些机器人例如pr_2是base_footprint,这是base_link原点在地面上的投影。不过在2D导航中两者表达的意思是一样的。
官网上是这么说的
The nav_msgs/Odometry message stores an estimate of the position and velocity of a robot in free space:
The pose in this message corresponds to the estimated position of the robot in the odometric frame along with an optional covariance for the certainty of that pose estimate. The twist in this message corresponds to the robot’s velocity in the child frame, normally the coordinate frame of the mobile base, along with an optional covariance for the certainty of that velocity estimate.
多个机器人仿真导航时,机器人的xacro文件中修改插件 differential_drive_controller的odom topic为$ (arg bodyframe)/odom其中bodyframe在launch文件中给出,其值是每个小车对应的命名空间,这样就可以分开查看每个小车的odom话题了,如果不改话题名,这种情况下odom会不断发出每个机器人的odom。但是多个小车仿真中,若指定其中一个导航,move_base文件中需要导航小车的odom话题,但此时odom里是多个小车的信息,这种需要用到特定小车odom消息的情况时,必须给每个小车特定的odom topic的名字。
不需要修改插件中的odom frame,因为插件中的robotbaseframe修改为$(arg bodyframe)/base_footprint,因此在查看tf时,会发现odom到不同的base_footprint.例如odom——>ares1/base_footprint odom——>ares2/base_footprint
,odom——>ares3/base_footprint