Python, NumPy, ROS
Daniel Seita
CSCI 545: Introduction to Robotics (Fall 2025)
September 04, 2025
Based on slides from Varun Bhatt, Bryon Tjanaka, Chris Denniston, Stefanos Nikolaidis.
1
Python
Tutorial if you are new to python:�https://learnxinyminutes.com/docs/python/
Note: even though it is meant as a “quick” refresher, the best way to learn how to use a programing language is to use it (often).
2
Basic Python Usage
3
Python Pros
4
Image from https://slides.btjanaka.net/545-python-intro/#/6 (actual source unknown)
Python Cons
5
Useful Tools: Python Management
6
Useful Tools: Code Editors
My personal usage:
Note: everyone’s needs and preferences will vary. Please do what works for you.
7
Good editors with plugins for autocompletion, linting, profiling, debugging, formatting, etc. (image is for VS Code)
NumPy
Official tutorial:�https://numpy.org/devdocs/user/quickstart.html
This is one of the most widely used Python libraries.
Also closely related to PyTorch and other Deep Learning libraries.
8
Demo
9
Softmax with Numpy Arrays (Vectorized)
10
ROS
Official tutorial:�http://wiki.ros.org/ROS/Tutorials
Widely used in robotics research code today (and historically).
https://spectrum.ieee.org/the-origin-story-of-ros-the-linux-of-robotics
Note: installing can be tricky.
Use Docker, VMware, follow instructions carefully.
Answers.ros.org is deprecated; use robotics.stackexchange.com, etc.
11
Typical Robot
Need some way for these modules to talk to each other
12
Sensors (e.g., cameras)
Actuators (e.g., motors)
Algorithms (e.g., planning, localization)
ROS (Robot Operating System)
13
ROS2
14
Nodes, Topics, Publishers, and Subscribers
15
Image from https://slides.btjanaka.net/545-python-intro/#/18 (actual source unknown) Code snippet from Daniel Seita here, just an example, not meant to be run.
Demo
16
Lab 01
17
Miscellaneous
18