How to transform from occupancyGrid-coordinates to map-coordinates [closed]
Hey ROS-community,
I am new to ROS and have the following problem: I got car which is driving around and scanning the world for obstacles. These scans are published via an OccupancyGrid. From the coordinates, i.e. the indices of the data-matrix, I want to calculate the map coordinates to know where the obstacle is and to compare later whether it is moving or not.
I tried already this https://answers.ros.org/question/2011..., but the results are not correct. So I guess I have to take the orientation of the car/the occupancyGrid or something else into account, but I don't know how.
Can you help me or provide a suggestion how to solve this problem? I already encountered the TF-package, but since it seems to be a quite large package and my problem seems to me to be done in a few lines of code, I don't want to overshoot.
Can you detail exactly what you tried and why you believe the results aren't correct ?
Update: Was my fault. Thought the coordinates of my /pose topic are map-coordinates, but they were world-coordinates, so I had to transform again and then it worked :D