Jetbot Python Module location

Hello all, I would like to start by saying I am super new to software so this may be something really obvious that I am just not understanding. I have finished assembling my Jetbot and successfully tested the collision avoidance notebook. I would like to play around more with this but i wanted to dig around in the Jetbot module specifically in the robot class first just to see what all i can do, but i cannot find where it is. Does anyone know where how to find the Jetbot module? For instance one part of the code says from, Jetbot import Robot, this means jetbot is a python module, and Robot() is a class within that module right? Or do i have it all wrong!

Hi damon.reddy,

Thanks for reaching out!

Nearly correct! The Robot actually class lives inside the jetbot.robot module. You can see the Robot class defined here

The reason that you can import it directly from the jetbot package is because it is included in the packages init.py file.

https://github.com/NVIDIA-AI-IOT/jetbot/blob/96cf3c3c25e1d7757ccc93cb88b4df1f612734ef/jetbot/init.py#L4

For reference

  • A Python Package is a folder with an __init__.py file.
  • A Python Module is a python file containing some code

Please let me know if this helps or you have any other questions.

Best,
John