iRobot Root rt1 Programming

Job ID: 37478655

Budget: $30 – $250 USD

I am looking for a freelancer to program the iRobot Root rt1 using Python*. The main function required for this project is navigation. The project needs to be completed within a week.

Skills and experience required:
- Proficiency in Python programming language
- Experience in programming robotic systems
- Knowledge of navigation algorithms and techniques
- Familiarity with the iRobot Root rt1 platform and its capabilities

If you have an rt1 you will be able to use raw Python. If not then you can use the simulated environment as seen in the screenshot and available here. https://code.irobot.com

This is a very simple task and should only take a few days.

I need someone to code the robot to draw numbers 0 to 9 and letters A to Z, each letter in it's own sub and to reset the position of the robot to the start position for the next letter once it's finished the previous letter.

I have done A,B and C and here is the example code.

#
# Licensed under 3-Clause BSD license available in the License file. Copyright (c) 2021-2022 iRobot Corporation. All rights reserved.
#

# This program is just used for testing the navigation with a single move.

from irobot_edu_sdk.backend.bluetooth import Bluetooth
from irobot_edu_sdk.robots import event, hand_over, Color, Robot, Root, Create3
from irobot_edu_sdk.music import Note
import time

robot = Root(Bluetooth())


def f(value):
return format(value, '.2f')


async def print_pos(robot):
pos = await robot.get_position()
print('? (x y heading) = (', f(pos.x), f(pos.y), f(pos.heading), ')')

async def resetPos():
#reset robot to point north
pos = await robot.get_position()
print(f(pos.heading))

if pos.heading > 90:
await robot.turn_right(pos.heading-90)

if pos.heading < 90:
await robot.turn_left(90-pos.heading)

pos = await robot.get_position()
print(f(pos.heading))

async def goHome():
#Go home
await robot.set_marker(Root.MARKER_UP)
await robot.navigate_to(30,2)
await robot.navigate_to(1,2)
await resetPos()


async def LetterPosition(LetterNum):
#Setup letter positions
StartV = 30
StartH = 0
letter2V = 30
letter2H = 6
letter3V = 30
letter3H = 12

if LetterNum == 1:
await robot.navigate_to(StartH, StartV)

if LetterNum == 2:
await robot.navigate_to(letter2H, letter2V)

if LetterNum == 3:
await robot.navigate_to(letter3H, letter3V)

async def LetterA():
#This draws Letter A
await robot.set_marker(Root.MARKER_DOWN)
await robot.turn_right(6)
await robot.move(5)
await robot.turn_right(159)
await robot.move(5)
await robot.move(-2)
await robot.turn_right(105)
await robot.move(1)
await robot.set_marker(Root.MARKER_UP)
#set position for next letter
await robot.turn_left(90)
await robot.move(0.5)
await robot.turn_left(90)
await robot.move(4)
await robot.turn_left(90)

async def LetterB():
await robot.set_marker(Root.MARKER_DOWN)
await robot.move(5)
await robot.turn_right(90)
await robot.move(2)
await robot.arc(Robot.DIR_RIGHT,180,0.7)
await robot.move(2.5)
await robot.arc(Robot.DIR_RIGHT,180,0.5)
await robot.move(1.5)
await robot.arc(Robot.DIR_RIGHT,180,0.7)
await robot.move(2)
await robot.set_marker(Root.MARKER_UP)
#set position for next letter
await robot.turn_left(180)
await robot.move(5)
await robot.turn_left(90)


async def LetterC():
await robot.move(7)
await robot.turn_right(90)
await robot.move(2)
await robot.turn_right(180)
await robot.set_marker(Root.MARKER_DOWN)
await robot.arc(Robot.DIR_LEFT,190,2)
await robot.set_marker(Root.MARKER_UP)
#set position for next letter
await robot.move(2)


@event(robot.when_play)
async def play(robot):
#This is the actual program

#Reset nav before starting
await robot.reset_navigation()
await robot.set_marker(Root.MARKER_UP)

#Go to first letter position
await LetterPosition(1)


#Print A
await LetterA()

#Print B
await LetterB()

# Print C
await LetterC()


#Go home
await goHome()





'''
await robot.reset_navigation()
await print_pos(robot)
await robot.navigate_to(distance, distance)
await print_pos(robot)

await robot.turn_left(90)
await print_pos(robot)
await robot.move(-distance)
await print_pos(robot)

await robot.set_lights_rgb(30, 255, 100)

#Directional correction
while pos.heading > 90:
await robot.turn_right(1)
pos = await robot.get_position()
print('Turning Right',f(pos.heading))
'''
while pos.heading < 90:
await robot.turn_left(1)
pos = await robot.get_position()
print('Turning Left', f(pos.heading))

# await robot.turn_right(200)
# await resetPos()

'''

'''
robot.play()
Related categories: Python Electronics Software Architecture Arduino