How should I know the real pose of the GridMap
I received the map data from the topic named map
, and I used the data to draw an OccupyGrid, the topic usually return a square array data, the width * height looks like 192 * 192, 512 * 512.
But the topic return a non-square array data occasionally, like 5035, 10080. In this case, the data of the topic looks like:
root@user-laptop:/home/ros-test# rostopic echo map
header:
seq: 7270
frame_id: "map"
info:
resolution: 0.0500000007451
width: 100
height: 80
origin:
position:
x: -5.0
y: -4.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0
data: [....]
And I subscribed the robot_pose
topic to render a pose shape on the OccupyGrid in my app that is incorrect.
But the pose is correct in another app(deigo-app
). Sorry I can't let the bug appear again, but it's real.
I found a project on github named RobotCA
: https://github.com/ros-autom/RobotCA. I think the deigo-app is based on this project. However the RobotCA only rendered a LaserScan
map without a OccupyGridMap
.
I read the source code of android-apps
, It is render the pose by using the topic "initialpose", the link is behind:
https://github.com/rosjava/android_ap...
I can't find the "initialpose" topic on my machine.
root@user-laptop:/home/ros-test# rostopic list | grep pose
/amcl_pose
/robot_pose
But the deigo-app is still work. I don't know which topic is used. I don't have the source code.
The deigo-app
apk file is here :https://ufile.io/m53g4ei6, no virus.
How can I render the pose correctly in GridMap?
Can you be more precise ? Do you manually publish to the topic map ?
I have updated the question. I just draw a GridMap, the gridmap data is subscribed from topic which named
map
You have to be a lot more precise please. When talking about
GridMap
are you refering to anOccupancyGrid
? How did you draw it ? You don't "draw" a map using a topic.If you have drawn the map why would you subscribe to the topic map instead of publishing your
OccupancyGrid
to the topicmap
?