Error Course Modules

Hi I am with problem to access the class 7 and 8 from the course ROS NAVIGATION in 5 DAYS. I also am doing the ROS beginner PATH modules and completed the Python3 course. Maybe a confusing ot the “My learning area”, where the 2 courses are side by side. When I access the Ros Navigation course, some classes are mixed of these 2 PATHS courses. For example: THE ROS NAVIGATION COURSE has 10 classes. And I can just see 6, then it steps to class 8, which is the same class of the python3 course. Why is this happening. How can I fix this issue, to see again all the classes?

Abother question is. I finished my program to move the turtlebot out the labyrinth, however it did not work, I woul like to see the solution. But it is not available. Where can I access the solution of this last project of python3 class?

Thanks in advance

Hi @marcusvini178,

The ROS Navigation course has only 8 chapters (NOT 10), numbered from 0 to 8 (7 is skipped but don’t worry about it).

And, yes, the last units of both courses are the same This is normal and is like that for almost all the courses.

I’m afraid we are not showing the solution here as we want our learners to push hard and solve the problem. You can ask help from the community on the part of your code that is not working.

Ok @bayodesegun thanks for the feedback. I have already done a post asking to someone helps me to make the turtlebot stop moving in an infinite turning loop when it is close the wall.

my code is below

from robot_control_class import RobotControl

import time

robotcontrol = RobotControl()

class MoveRobot:
def init(self, motion, clockwise, speed, time):
self.robot = RobotControl()
self.motion = motion
self.clockwise = clockwise
self.speed = speed
self.time = time
self.time_turn = 2
self.full_laser = self.robot.get_laser_full()
self.laser = self.robot.get_laser(360)

def out_maze(self):

    corner = 0

    while (corner < 2):
        while (self.laser > 1):
            self.move_straight()
            self.laser = self.robot.get_laser(360)
            print("Current distance to  this wall is %f meters" % self.laser)
        self.robot.stop_robot()
        self.turn()

    corner+=1

def door_maze(self):

    door = 0
    while (self.laser > 1):
        self.move_straight()
        self.laser = self.robot.get_laser(360)
        print("Current distance to wall is %f meters" % self.laser)
    self.robot.stop_robot()
    self.turn()

def move_x_seconds(self):

    self.robot.move_straight()
    time.sleep(secs)
    self.robot.stop_robot()


def move_straight_time(self):
    self.robot.move_straight_time(self.motion, self.speed, self.time)
def move_straight(self):
    self.robot.move_straight()
def turn(self):
    self.robot.turn(self.clockwise, self.speed, self.time_turn)
def stop_robot(self):
    self.robot.stop_robot()

move_inside = MoveRobot(‘forward’, ‘clockwise’, 0.75, 2)
move_inside.out_maze()

move_outside = MoveRobot(‘forward’, ‘counterclockwise’, 0.5, 2)
move_outside.door_maze()

move_horizon = MoveRobot()
move_horizon.move_x_seconds(3)

Well I solved the previous issue…I needed to repeat the get_laser function out and inside the while.
However my robot yet does not complete the task to get out the maze…he just follow my first loop of while and turn just in clockwise direction. So it never reaches the maze escape, because its last move must be counterclockwise. Could you help to fix this issue? The code is below

from robot_control_class import RobotControl

import time

robotcontrol = RobotControl()

class MoveRobot:
def init(self, motion, clockwise, speed, time):
self.robot = RobotControl()
self.motion = motion
self.clockwise = clockwise
self.speed = speed
self.time = time
self.time_turn = 2
self.full_laser = self.robot.get_laser_full()
self.laser = self.robot.get_laser(360)

def out_maze(self):

    corner = 0

    while (corner < 1):
        self.laser = self.robot.get_laser(360)
        while (self.laser > 1):
            self.move_straight()
            self.laser = self.robot.get_laser(360)
            print("Current distance to  this wall is %f meters" % self.laser)
        self.robot.stop_robot()
        self.turn()

    corner+=2

def door_maze(self):

    door = 0
    self.laser = self.robot.get_laser(360)
    while (self.laser > 1):
        self.move_straight()
        self.laser = self.robot.get_laser(360)
        print("Current distance to wall is %f meters" % self.laser)
    self.robot.stop_robot()
    self.turn_left()

def move_x_seconds(self):

    self.robot.move_straight()
    time.sleep(secs)
    self.robot.stop_robot()


def move_straight_time(self):
    self.robot.move_straight_time(self.motion, self.speed, self.time)
def move_straight(self):
    self.robot.move_straight()
def turn(self):
    self.robot.turn(self.clockwise, self.speed, self.time_turn)
def turn_left(self):
    self.robot.turn(self.counterclockwise, self.speed, self.time_turn)
def stop_robot(self):
    self.robot.stop_robot()

move_inside = MoveRobot(‘forward’, ‘clockwise’, 0.75, 2)
move_inside.out_maze()

move_outside = MoveRobot(‘forward’, ‘counterclockwise’, 0.5, 2)
move_outside.door_maze()

move_horizon = MoveRobot()
move_horizon.move_x_seconds(3)

Well more one upgrade. I almost get my robot out the maze door. However the robot failure very close it

please help me: Look my code:

from robot_control_class import RobotControl

import time

robotcontrol = RobotControl()

class MoveRobot:
def init(self, motion, clockwise, speed, time):
self.robot = RobotControl()
self.motion = motion
self.clockwise = clockwise
self.speed = speed
self.time = time
self.time_turn = 2.5
self.full_laser = self.robot.get_laser_full()
self.laser = self.robot.get_laser(360)

def out_maze(self):

    corner = 0

    while (corner < 2):
        self.laser = self.robot.get_laser(360)
        while (self.laser > 1):
            self.move_straight()
            self.laser = self.robot.get_laser(360)
            print("Current distance to  this wall is %f meters girando direita" % self.laser)
        self.robot.stop_robot()
        self.turn()
        corner+=1

def door_maze(self):

    door = 0

    while (door <2):
        self.laser = self.robot.get_laser(360)
        while (self.laser > 1):
            self.move_straight()
            self.laser = self.robot.get_laser(360)
            print("Current distance to wall is %f meters girando esquerda" % self.laser)
        self.robot.stop_robot()
        self.turn()
        door+=1


def move_straight_time(self):
    self.robot.move_straight_time(self.motion, self.speed, self.time)
def move_straight(self):
    self.robot.move_straight()
def turn(self):
    self.robot.turn(self.clockwise, self.speed, self.time_turn)
def stop_robot(self):
    self.robot.stop_robot()

move_inside = MoveRobot(‘forward’, ‘clockwise’, 0.75, 2.5)
move_inside.out_maze()

move_outside = MoveRobot(‘forward’, ‘counterclockwise’, 0.75, 2.5)
move_outside.door_maze()

I have answered already in another place.
Please respect the forum and post your question only once on the forum channel related to the course you are working with.
We are answering all the questions. Please be patience and do not take all the space of the Forum for you