Unit 6 - Micro Project, How to Import 'rotate()' function

It has been mentioned in the project that you can use rotate() function, but it is not a part of the robot_control_class.py file or RobotControl() class, so where can I find the rotate() function?

Hello @rutweek.joshi ,

I’ve update the Project notebook to include the code of the class with the rotate() function.


Thank You very much Sir. I actually solved it using turn() function. If I post my program here, will you please go through it and guide me regarding improvements in it?

Hello Alberto,
When i copy the new code of the class, that you added, then i get some errors in the explorer at the file.

There is red wavy lines beneath the variables “Point” and “Quaternion”.

return (Point(*trans), self.quat_to_angle(Quaternion(*rot)))

Is this an issue, or should i just continue?

Best regards


Another thing, the new code refers a lot to the robot summit, but does not refer to turtlebot anywhere, and this project is for the turtlebot. Will i work anyways?

Hi @Tranium,

the error shown when importing Point or Quaternion, don’t affect the working of the code. It’s just an “error” in the Editor.

The code provided by Alberto should would just fine.

Please let us know if you have any other questions.