Problem Exercise 2.1 in Linux for Robotics

Hi!
I’m new to ROS and started the “Linux for Robotics” free course (sorry didn’t find the category tag).

When trying to complete Exercise 2.1 move_bb8_square.py I get the following error message:

Traceback (most recent call last):
File “/home/user/catkin_ws/src/linux_course_files/move_bb8_pkg/my_scripts/move_bb8_square.py”, line 68, in
movebb8_object.move_square(side=0.6)
TypeError: move_square() got an unexpected keyword argument ‘side’
[INFO] [1567337502.462870, 0.000000]: shutdown time! Stop the robot

I have the following permissions associated to the file:

user:~/catkin_ws/src/linux_course_files/move_bb8_pkg/my_scripts$ ls -latotal 12
drwxr-xr-x 2 user user 4096 Sep 1 11:29 .
drwxr-xr-x 4 user user 4096 Sep 1 10:54 …
-rwxr-xr-x 1 user user 2203 Sep 1 11:28 move_bb8_square.py

Any help on how to solve this is highly appreaciated.

Thanks!

Hi again!

I edited the code of the “move_bb8_square.py” changing the value in line 68 of the parameter (side=0.6) to a simple number, 10 for instance.

movebb8_object.move_square(10)

I don’t know if this is correct but it seems to work fine for this example.

Ciao!

1 Like

how is the move_square() function defined? The error says that it doesnt expect the ‘side’ keyword. So it most likely that the expected parameter is called differently. This gives you two choices:

  1. name it correctly
  2. leave it out and call it like that:
movebb8_object.move_square(0.6)
3 Likes

Thanks!
That’s what I did :blush:

1 Like