Skip to content

Commit

Permalink
Merge pull request #2926 from JdeRobot/montecarlo_visual_loc_update_g…
Browse files Browse the repository at this point in the history
…h-pages

Montecarlo visual loc update gh pages
  • Loading branch information
javizqh authored Dec 23, 2024
2 parents 7d1b683 + 4c540f9 commit 8c97692
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _pages/exercises/ComputerVision/montecarlo_visual_loc.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,19 @@ while True:
* `HAL.getPose3d().x` - to get the position of the robot (x coordinate)
* `HAL.getPose3d().y` - to obtain the position of the robot (y coordinate)
* `HAL.getPose3d().yaw` - to get the orientation of the robot
* `HAL.getOdom().x` - to get the approximated X coordinate of the robot (with noise)
* `HAL.getOdom().y` - to get the approximated XY coordinate of the robot (with noise)
* `HAL.getOdom().yaw` - to get the approximated orientation position of the robot (with noise)
* `GUI.showImage()` - allows you to view a debug image or with relevant information
* `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.
* `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.
* `GUI.mapToPose(x, y, yaw)`- converts a map pixel to gazebo world coordinate system position.
* `GUI.poseToMap(x, y, yaw)`- converts a gazebo world coordinate system position to a map pixel.
* `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

```python
array = GUI.getMap('/resources/exercises/montecarlo_laser_loc/images/mapgrannyannie.png')
```


## Theory
Expand Down

0 comments on commit 8c97692

Please sign in to comment.