Simple robot control and navigation based on aruco markers — part 2

Test script

The navigation will be done on PC. I used Python. (no curly brackets — weird)

Lets test our vision server

Simple Python code to get marker data:

        s = ""
        vision_server_client.send("g".encode())  # send 'g' to get response
        s = vision_server_client.recv(10000)  # there must be a better way to do this
        markersDict = json.loads(s.decode())

    aruco_markers = markersDict["aruco"]

    for m in aruco_markers:
        x = int(m['center']['x'])
        y = int(m['center']['y'])
        s = int(m['size'])
        h = (m['heading'])
        marker_id = int(m['ID'])
        corners = m['markerCorners']

            xm, ym, zm, roll_marker, pitch_marker, yaw_marker = getMarkerAttitude(corners, 10)  # for extra info, openCV needed

And we can draw markers:

Everything seems to be working fine.

Complete Python code is here:

One thought on “Simple robot control and navigation based on aruco markers — part 2”

  1. Please I how can I implement the Arucoandroidserver actually I have no clue what of if I use Astar algorithm for the path planning, how can I localized the robot

Leave a Reply

Your email address will not be published. Required fields are marked *