Visiloc is a camera-based indoor localization system which uses ArUco markers to estimate position and orientation in real-time, without the use of a GPS
Every 30 miliseconds the robot's camera captures an image and sends it over to the Visloc. The first thing Visiloc does is convert the image to grayscale and starts checking if any of them contain the specific bit pattern that matches our marker ID.
Simulated Room
Once the marker is located Opencv gives us two pieces of data: rvec (rotation vector) and tvec (translation vector), these vectors are used to used to describe the marker's 3D pose relative to the camera. Using these vectors we are able to find the location of the bot with respect to the marker postion in the world by using the formula camera_position = -R^T × tvec (where R is the rotation matrix).
Marker on North Wall
Using some trigonometry and math, we can then rotate this camera position from the marker's coordinate frame into the world coordinate frame, giving us the robot's exact position in the world
![]() |
![]() |
![]() |
|---|---|---|
| Simulated Bot | Anotated Camera Output | Calculated Location |
![]() |
![]() |
![]() |
|---|---|---|
| Simulated Bot | Anotated Camera Output | Calculated Location |
- clone the repo
git clone https://github.com/vedantmalkar/VisiLoc.git
cd VisiLoc/ros_ws/
- build and source your workspace
colcon build
source install/setup.bash
- launch simulation
ros2 launch ignition_robot complete.launch.py
- on seperate terminal run finder node
ros2 run vision_controller coordinate_finder
- on another terminal run visualizer node
ros2 run vision_controller coordinate_visualizer
- move your bot using teleop_twist_keyboard on seperate terminal
ros2 run teleop_twist_keyboard teleop_twist_keyboard







