laser_scan_matecher를 사용해보면 laser_scan_matecher의 demo.launch를 실행했을 때의 world - base_link 의 위치 정확도보다 demo_gmapping.launch를 실행했을 때, map - base_link의 정확도가 더 높았는데 이게 localization이 들어가서 인듯 하다.
laser_scan_matcher 노드의 결과물은
jio@jio-ThinkBook-15-G3-ACL:~$ rostopic type pose_stamped geometry_msgs/PoseStamped
move_base로 들어가야 하는 odometry topic 형식은 jio@jio-ThinkBook-15-G3-ACL:~$ rostopic type odom nav_msgs/Odometry
header:
seq: 404
stamp:
secs: 1685825719
nsecs: 789016288
frame_id: "odom"
pose:
position:
x: 0.0006121923361323833
y: -6.86754141936184e-05
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.001364433757095769
w: 0.9999990691598281
header:
seq: 4531
stamp:
secs: 151
nsecs: 229000000
frame_id: "odom"
child_frame_id: "base_footprint"
pose:
pose:
position:
x: -1.9742545272754923
y: -0.5332430164493795
z: -0.001007826246804875
orientation:
x: -0.0015908112076330966
y: -2.1050563297076965e-05
z: 0.9999283841046145
w: -0.011861515017492889
covariance: [1e-05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1e-05, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1000000000000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.001]
twist:
twist:
linear:
x: 0.00024880704530820676
y: 4.267829745641597e-07
z: 0.0
angular:
x: 0.0
y: 0.0
z: -0.0001647300649712482
covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---
I'm trying to make a turtlebot like robot using only the RPLidar. Hence I donot have a good source for odometry. I'm getting the Pose2D
using laser_scan_matcher
, and can use the values and represent it in nav_msgs/Odometry
.
I've also found a way to use these pose2D values with /scan headers to roughly calculate velocities.
But I want to know is it mandatory to have Twist
information for move_base to work? Or does move_base only require Pose from the odometry messages?