Skip to content

Commit 8c97692

Browse files
authored
Merge pull request #2926 from JdeRobot/montecarlo_visual_loc_update_gh-pages
Montecarlo visual loc update gh pages
2 parents 7d1b683 + 4c540f9 commit 8c97692

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

_pages/exercises/ComputerVision/montecarlo_visual_loc.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,19 @@ while True:
114114
* `HAL.getPose3d().x` - to get the position of the robot (x coordinate)
115115
* `HAL.getPose3d().y` - to obtain the position of the robot (y coordinate)
116116
* `HAL.getPose3d().yaw` - to get the orientation of the robot
117+
* `HAL.getOdom().x` - to get the approximated X coordinate of the robot (with noise)
118+
* `HAL.getOdom().y` - to get the approximated XY coordinate of the robot (with noise)
119+
* `HAL.getOdom().yaw` - to get the approximated orientation position of the robot (with noise)
117120
* `GUI.showImage()` - allows you to view a debug image or with relevant information
118121
* `GUI.showParticles(particles)` - shows the particles on the map. Accepts a list of particles as an argument. Each particle must be a list with [position_x, position_y, angle_in_radians, weight]. The values must be in gazebo world coordinate system.
119122
* `GUI.showPosition(x, y, yaw)` - shows the estimated user position in the map view in blue. Accepts a list with [position_x, position_y, angle_in_radians]. The values must be in gazebo world coordinate system. The map view will also show the real position of the robot in red, so you can compare how good your algorithm is.
123+
* `GUI.mapToPose(x, y, yaw)`- converts a map pixel to gazebo world coordinate system position.
124+
* `GUI.poseToMap(x, y, yaw)`- converts a gazebo world coordinate system position to a map pixel.
125+
* `GUI.getMap(url)` - Returns a numpy array with the image data in a 3 dimensional array (R, G, B, A). The image is 1012x1012. The instruction to get the map is
126+
127+
```python
128+
array = GUI.getMap('/resources/exercises/montecarlo_laser_loc/images/mapgrannyannie.png')
129+
```
120130

121131

122132
## Theory

0 commit comments

Comments
 (0)