Reading:
Read Real Robots Don't Drive Straight
*Reminder: Readings are your responsibility. You will be expected to come to class prepared, having read the material, and ready to participate in the discussion*
### Logistics * Let's do the post-it-note exercise * Lets talk about the use of ChatGPT to produce code * James asked in Lab last week, why not just use the PID algorithm that is provided by ChatGPT * Further discussion... * Note about due dates for all assigments. There is always a 3 day grace period. * About the reading for today: [CLick Here](https://moodle.brandeis.edu/mod/assign/view.php?id=70275)
### How do Robots Perceive? Sensors * What is a sensor? Is a sensor an input or output device? * What happens to the sensing information * How is it stored and detected and acted upon?
### Types of Sensors * Is a sensor an input or output device? * Proprioception * Is a keyboard a sensor? * Is a joystick a sensor? * Is a map a sensor? * Active Vs. Passive * Sensor Fusion
### What do all sensors have in common? * They generate a stream of data * They have an electrical connection to the computer onboard the robot * Usually it is to the microcontroller because of real time capability * Software on the microcontroller (e.g, arduino) is called firmware * Firware does some processing of the data (case by case) * Delivers it to the SBC (Single Board Computer, e.g. Rasberry Pi) in the form of topics published
### What kinds of electrical connections? * Very dependent on the sensor * Analog and Binary pins * I2C Bus * And others * Almost always there is an arduino library to interface
### Lidar * What is a Lidar * What does it look like and how does it work? * "Time of travel" or "Time of Flight" * What does the data look like? * [Look here fore the message definition](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/LaserScan.html) * `roslaunch turtlebot3_gazebo turtlebot3_stage_1.launch` * `roslaunch turtlebot3_gazebo turtlebot3_gazebo_rviz.launch` * `rostopic echo --noarr -c /scan`
### Subtleties * What do the directions mean? * Are the directions absolute or relative? * What if the robot is not pointing to where you think? * Do they go clockwise or counterclockwise? * Lets look at the data! * It's not clean! (This is typical for all sensors) * It is not accurate! * It's sometimes wildly inaccurate * It is constantly flooding in
### Breakout (15 Minutes) * Documentation for [LaserScan Data](http://docs.ros.org/melodic/api/sensor_msgs/html/msg/LaserScan.html) * Given 1. angle_min = 0 # exactly forward 2. angle_max = 359 (deg) 3. range_min = 0.12 (m) 4. range_max = 3.5 (m) * With your teammates write a few lines of python * Set the variable wall_ahead to true or false * One or two lines of python * True means that there's an obstacle ahead at < 0.3 m
### GPS
* They vary tremendously in price * For example: [GPS Receiver Module](https://www.robotshop.com/products/dfrobot-gravity-gnss-gps-beidou-receiver-module-i2c-uart)
### Motor (encoder) * How it works * Key characteristics or features * What data it provides
### Camera * How it works * Key Characteristics or features * What Data it provides
### Depth Camera * How it works * Key Characteristics or features * Example [ToF Camera](https://www.dfrobot.com/product-2740.html) * What data it provides
### Ultra Sonic Sensor * How it works * Key Characteristics or features * Example: [Ultrasonic Distance Sensor](https://www.sparkfun.com/products/15569) * What data it provides
### Bumper sensors * How it works * Key Characteristics or features * Example: [Bumper Sensopr](https://www.robotshop.com/products/bumper-sensor-robot) * What data it provides
### IMU - Inertial Measurement Unit * Acceleration: dynamic and static (as in gravity) * See [Accelerometer, Gyro, IMU buying guide](https://www.sparkfun.com/pages/accel_gyro_guide) * Gyro: Angular velocity - how fast spinning around an acciss * Can have them independently or combined into an IMU
Thank you. Questions?
(random Image from picsum.photos)