The lecture discusses driving autonomous vehicles and covers:
1. The hardware components of the RACECAR including its Intel RealSense camera, depth camera, and LIDAR sensor.
2. How the sensors measure distance and their limitations.
3. Controlling the RACECAR using modules like drive and controller to set speed, angle, and respond to button inputs.
4. Programming paradigms like global variables and start/update functions for the RACECAR code.
This document discusses BlaBlaCar's transition from a relational database to the search engine Elasticsearch. It describes how BlaBlaCar changed its data model and indexing approach to better suit Elasticsearch. Challenges included modifying mappings, handling grouping, and dealing with IO limits on their initial two node cluster. The document encourages following BlaBlaCar and applying for open jobs.
Presentation on Auto Tuning delivered as part of our "Software for Multicore Processors" course at UT Austin. It covers the basics of AutoTuning and details of two library generators called PhiPAC and ATLAS.
Machine Learning Laboratory set of experiments, including ANN, Backpropagation, K-Means, Hierarchical Clustering, Linear Regression, Multivariate Regression, Fuzzy Logic.
Workshop slides which give an overview of python programming. The slides are accompanied by DIY (do it yourself) programs which can be found as in GitHub (https://github.com/bhalajin/blueprints)
This document discusses computer algorithms and provides examples of algorithms in Python. It begins by defining an algorithm and providing examples of sorting algorithms like insertion sort, selection sort, and merge sort. It then discusses searching algorithms like linear search and binary search, including their time complexities. Other topics covered include advantages of Python, types of problems solved by algorithms, and limitations of binary search.
OpenGL is a software interface that allows programmers to create 2D and 3D graphics. It consists of over 150 commands to specify graphics objects and operations. OpenGL is designed to be hardware-independent and supported across different platforms. The OpenGL architecture uses a pipeline that processes commands from display lists, evaluates polynomials, performs per-vertex and per-fragment operations, and renders to the framebuffer. Key operations include geometric primitives, attributes, transformations, viewing, clipping, blending, and using a z-buffer for hidden surface removal. OpenGL programs utilize various functions to define graphics, attributes, views, inputs, and window controls.
The document provides an introduction to various data structures and algorithms concepts. It discusses different types of data structures like simple, compound, linear and non-linear data structures. It also covers algorithm analysis concepts like time complexity, asymptotic notations and different searching and sorting algorithms like linear search, binary search, bubble sort, selection sort, insertion sort, quick sort and merge sort. It provides pseudocode examples of recursive algorithms like factorial, Fibonacci sequence and towers of Hanoi problem.
This document discusses BlaBlaCar's transition from a relational database to the search engine Elasticsearch. It describes how BlaBlaCar changed its data model and indexing approach to better suit Elasticsearch. Challenges included modifying mappings, handling grouping, and dealing with IO limits on their initial two node cluster. The document encourages following BlaBlaCar and applying for open jobs.
Presentation on Auto Tuning delivered as part of our "Software for Multicore Processors" course at UT Austin. It covers the basics of AutoTuning and details of two library generators called PhiPAC and ATLAS.
Machine Learning Laboratory set of experiments, including ANN, Backpropagation, K-Means, Hierarchical Clustering, Linear Regression, Multivariate Regression, Fuzzy Logic.
Workshop slides which give an overview of python programming. The slides are accompanied by DIY (do it yourself) programs which can be found as in GitHub (https://github.com/bhalajin/blueprints)
This document discusses computer algorithms and provides examples of algorithms in Python. It begins by defining an algorithm and providing examples of sorting algorithms like insertion sort, selection sort, and merge sort. It then discusses searching algorithms like linear search and binary search, including their time complexities. Other topics covered include advantages of Python, types of problems solved by algorithms, and limitations of binary search.
OpenGL is a software interface that allows programmers to create 2D and 3D graphics. It consists of over 150 commands to specify graphics objects and operations. OpenGL is designed to be hardware-independent and supported across different platforms. The OpenGL architecture uses a pipeline that processes commands from display lists, evaluates polynomials, performs per-vertex and per-fragment operations, and renders to the framebuffer. Key operations include geometric primitives, attributes, transformations, viewing, clipping, blending, and using a z-buffer for hidden surface removal. OpenGL programs utilize various functions to define graphics, attributes, views, inputs, and window controls.
The document provides an introduction to various data structures and algorithms concepts. It discusses different types of data structures like simple, compound, linear and non-linear data structures. It also covers algorithm analysis concepts like time complexity, asymptotic notations and different searching and sorting algorithms like linear search, binary search, bubble sort, selection sort, insertion sort, quick sort and merge sort. It provides pseudocode examples of recursive algorithms like factorial, Fibonacci sequence and towers of Hanoi problem.
jn;lm;lkm';m';;lmppt of data structure.pdfVinayNassa3
This document provides an introduction to data structures, algorithms, and complexity analysis. It begins with an overview of data structures and their classification as simple, compound, linear, or non-linear. Common operations on data structures like adding, deleting, and searching elements are described. The document then covers algorithm analysis, asymptotic notation, and examples of recursive and sorting algorithms like bubble sort, selection sort, and their time complexities. Searching techniques like linear, binary, and Fibonacci search are also summarized.
This document discusses return-oriented programming (ROP) techniques for exploiting systems with non-executable memory pages. It provides an overview of ROP, describes algorithms for automatically finding "gadgets" (snippets of code) within a binary that can be chained together to perform tasks, and introduces a ROP compiler called The Wolf that helps chain gadgets while accounting for side effects. The goal is to execute attacker-controlled code on systems with protections like code signing and sandboxing enabled.
Web Dynpro is SAP's framework for developing web-based user interfaces using declarative programming and the MVC model. It allows structuring complex web applications using components, controllers, contexts and views. A simple Web Dynpro application can be created by defining a component, window and view, and linking the view to the window. The view contains UI elements whose data is bound to the context via controllers.
Distributed implementation of a lstm on spark and tensorflowEmanuel Di Nardo
Academic project based on developing a LSTM distributing it on Spark and using Tensorflow for numerical operations.
Source code: https://github.com/EmanuelOverflow/LSTM-TensorSpark
The document provides an overview of memory forensics and the Rekall memory analysis tool. It discusses why memory forensics is useful, describes how Rekall supports multiple operating systems through profiles, and covers memory imaging, virtual memory concepts, and analyzing live memory. Rekall's interfaces like the command line, console, notebook, and web console are also introduced.
This document contains a summary of key topics and questions covered in a lecture on operating systems. It discusses x86 address translation, logical vs linear addresses, segment registers, paging mechanisms including page tables and page directory entries, user to kernel address space transitions, interrupt handling, physical memory allocation in xv6, per-CPU variables, stack handling, read-copy update synchronization, and techniques for improving performance of memory allocation and deallocation. Sample exam questions are provided on these topics as well.
This is the speech Max Liu gave at Percona Live Open Source Database Conference 2016.
Max Liu: Co-founder and CEO, a hacker with a free soul
The slide covered the following topics:
- Why another database?
- What kind of database we want to build?
- How to design such a database, including the principles, the architecture, and design decisions?
- How to develop such a database, including the architecture and the core technologies for TiKV and TiDB?
- How to test the database to ensure the quality and stability?
This document discusses how Qemu works to translate guest binaries to run on the host machine. It first generates an intermediate representation called TCG-IR from the guest binary code. It then translates the TCG-IR into native host machine code. To achieve high performance, it chains translated blocks together by patching jump targets. Key techniques include just-in-time compilation, translation block finding, block chaining, and helper functions to emulate unsupported guest instructions.
A talk given at PHP Cambridge all about Python
The slides cover Python from any other programmer's prospective - but the talk as given involved comparisons to PHP.
This document discusses processor design, including custom single-purpose processors and general-purpose processors. It covers topics such as combinational and sequential logic design, finite state machine design, optimizing custom processors by improving the original program, finite state machine with datapath, and datapath and finite state machine. General-purpose processors are also introduced, including their basic architecture consisting of a control unit and datapath.
SHOP 2 is a hierarchical task network (HTN) planner developed in LISP that was awarded for its performance in the 2002 international planning competition. It improves upon SHOP by allowing partially ordered tasks and subtasks, and supports many PDDL features. SHOP 2 decomposes complex tasks into subtasks through methods until reaching primitive tasks. It has been applied to domains like video games, evacuation planning, evaluating terrorist threats, and automated composition of web services.
This document describes the design and implementation of a basic computer called SAYEH. It includes descriptions of the CPU components like the register file, program counter, instruction register, and ALU. It provides details on the 35 instructions in SAYEH's instruction set and describes the datapath and hierarchical structure. The datapath connects the program counter, instruction register, register file, ALU, and other components. VHDL code is provided for some of the CPU components like the program counter, addressing unit, and register file.
Finding Xori: Malware Analysis Triage with Automated DisassemblyPriyanka Aash
In a world of high volume malware and limited researchers, we need a dramatic improvement in our ability to process and analyze new and old malware at scale. Unfortunately, what is currently available to the community is incredibly cost prohibitive or does not rise to the challenge. As malware authors and distributors share code and prepackaged tool kits, the white hat community is dominated by solutions aimed at profit as opposed to augmenting capabilities available to the broader community. With that in mind, we are introducing our library for malware disassembly called Xori as an open source project. Xori is focused on helping reverse engineers analyze binaries, optimizing for time and effort spent per sample.
Xori is an automation-ready disassembly and static analysis library that consumes shellcode or PE binaries and provides triage analysis data. This Rust library emulates the stack, register states, and reference tables to identify suspicious functionality for manual analysis. Xori extracts structured data from binaries to use in machine learning and data science pipelines.
We will go over the pain-points of conventional open source disassemblers that Xori solves, examples of identifying suspicious functionality, and some of the interesting things we've done with the library. We invite everyone in the community to use it, help contribute and make it an increasingly valuable tool in this arms race.
The document discusses graphics programming and OpenGL. It introduces OpenGL, describing it as a hardware-independent interface consisting of over 700 commands. It outlines the OpenGL API, including primitive functions, attribute functions, and viewing functions. It also covers OpenGL primitives like points, lines, and polygons, as well as attributes like color. It explains orthographic and two-dimensional viewing in OpenGL.
The document describes the Volcano/Cascades query optimizer. It uses dynamic programming to efficiently search the large space of possible query execution plans. The optimizer represents queries as logical and physical operators connected by transformation and implementation rules. It explores the logical plan space and then builds physical plans by applying these rules. The search is guided by estimating physical operator costs. The optimizer memoizes partial results to avoid redundant work. This approach allows finding optimal execution plans in a principled way that scales to complex queries and optimizer extensions.
Mirko Damiani - An Embedded soft real time distributed system in Golinuxlab_conf
An embedded system usually involves low level languages like C and highly customized hardware. In this talk we will see a use case of a soft real time system which was developed taking a very different approach, written in Go. We will see what are the advantages of this choice, along with its limits.
This document discusses using Hadoop and MapReduce to efficiently read and write large amounts of data to and from Cassandra in bulk. It provides an overview of how SSTables are structured in Cassandra and how the SSTableInputFormat and SSTableRecordReader work with MapReduce to read SSTables column-by-column. It also describes how to write a custom output format and record writer to bulk write sorted and decorated keys to SSTables using SSTableSimpleWriter. The challenges of partitioning keys and sending SSTables to Cassandra after writing are also addressed. Open sourcing the KassandraMRHelper library is mentioned to simplify these bulk read and write workflows.
The document provides an introduction to analyzing the performance of algorithms. It discusses time complexity and space complexity, which measure the running time and memory usage of algorithms. Common asymptotic notations like Big-O, Big-Omega, and Big-Theta are introduced to concisely represent the growth rates of algorithms. Specific algorithms like selection sort and insertion sort are analyzed using these metrics. Recursion and recurrence relations are also covered as methods to analyze algorithm efficiency.
Industrial Applications of Arduino using Ladder LogicRobocraze
This document provides an overview of using Arduino boards in industrial applications. It discusses the Arduino Pro series of boards including the Portenta H7, Edge Control, Nicla Sense ME, Nano 33 BLE, and MKR family. It then introduces ladder logic programming, the basics of how it works, and demonstrates it using an online IDE called IECuino. Circuit diagrams and programming examples for turning on an LED using buttons are provided to illustrate ladder logic programming with Arduino. The document concludes with information on asking questions.
Expanding Access to Affordable At-Home EV Charging by Vanessa WarheitForth
Vanessa Warheit, Co-Founder of EV Charging for All, gave this presentation at the Forth Addressing The Challenges of Charging at Multi-Family Housing webinar on June 11, 2024.
jn;lm;lkm';m';;lmppt of data structure.pdfVinayNassa3
This document provides an introduction to data structures, algorithms, and complexity analysis. It begins with an overview of data structures and their classification as simple, compound, linear, or non-linear. Common operations on data structures like adding, deleting, and searching elements are described. The document then covers algorithm analysis, asymptotic notation, and examples of recursive and sorting algorithms like bubble sort, selection sort, and their time complexities. Searching techniques like linear, binary, and Fibonacci search are also summarized.
This document discusses return-oriented programming (ROP) techniques for exploiting systems with non-executable memory pages. It provides an overview of ROP, describes algorithms for automatically finding "gadgets" (snippets of code) within a binary that can be chained together to perform tasks, and introduces a ROP compiler called The Wolf that helps chain gadgets while accounting for side effects. The goal is to execute attacker-controlled code on systems with protections like code signing and sandboxing enabled.
Web Dynpro is SAP's framework for developing web-based user interfaces using declarative programming and the MVC model. It allows structuring complex web applications using components, controllers, contexts and views. A simple Web Dynpro application can be created by defining a component, window and view, and linking the view to the window. The view contains UI elements whose data is bound to the context via controllers.
Distributed implementation of a lstm on spark and tensorflowEmanuel Di Nardo
Academic project based on developing a LSTM distributing it on Spark and using Tensorflow for numerical operations.
Source code: https://github.com/EmanuelOverflow/LSTM-TensorSpark
The document provides an overview of memory forensics and the Rekall memory analysis tool. It discusses why memory forensics is useful, describes how Rekall supports multiple operating systems through profiles, and covers memory imaging, virtual memory concepts, and analyzing live memory. Rekall's interfaces like the command line, console, notebook, and web console are also introduced.
This document contains a summary of key topics and questions covered in a lecture on operating systems. It discusses x86 address translation, logical vs linear addresses, segment registers, paging mechanisms including page tables and page directory entries, user to kernel address space transitions, interrupt handling, physical memory allocation in xv6, per-CPU variables, stack handling, read-copy update synchronization, and techniques for improving performance of memory allocation and deallocation. Sample exam questions are provided on these topics as well.
This is the speech Max Liu gave at Percona Live Open Source Database Conference 2016.
Max Liu: Co-founder and CEO, a hacker with a free soul
The slide covered the following topics:
- Why another database?
- What kind of database we want to build?
- How to design such a database, including the principles, the architecture, and design decisions?
- How to develop such a database, including the architecture and the core technologies for TiKV and TiDB?
- How to test the database to ensure the quality and stability?
This document discusses how Qemu works to translate guest binaries to run on the host machine. It first generates an intermediate representation called TCG-IR from the guest binary code. It then translates the TCG-IR into native host machine code. To achieve high performance, it chains translated blocks together by patching jump targets. Key techniques include just-in-time compilation, translation block finding, block chaining, and helper functions to emulate unsupported guest instructions.
A talk given at PHP Cambridge all about Python
The slides cover Python from any other programmer's prospective - but the talk as given involved comparisons to PHP.
This document discusses processor design, including custom single-purpose processors and general-purpose processors. It covers topics such as combinational and sequential logic design, finite state machine design, optimizing custom processors by improving the original program, finite state machine with datapath, and datapath and finite state machine. General-purpose processors are also introduced, including their basic architecture consisting of a control unit and datapath.
SHOP 2 is a hierarchical task network (HTN) planner developed in LISP that was awarded for its performance in the 2002 international planning competition. It improves upon SHOP by allowing partially ordered tasks and subtasks, and supports many PDDL features. SHOP 2 decomposes complex tasks into subtasks through methods until reaching primitive tasks. It has been applied to domains like video games, evacuation planning, evaluating terrorist threats, and automated composition of web services.
This document describes the design and implementation of a basic computer called SAYEH. It includes descriptions of the CPU components like the register file, program counter, instruction register, and ALU. It provides details on the 35 instructions in SAYEH's instruction set and describes the datapath and hierarchical structure. The datapath connects the program counter, instruction register, register file, ALU, and other components. VHDL code is provided for some of the CPU components like the program counter, addressing unit, and register file.
Finding Xori: Malware Analysis Triage with Automated DisassemblyPriyanka Aash
In a world of high volume malware and limited researchers, we need a dramatic improvement in our ability to process and analyze new and old malware at scale. Unfortunately, what is currently available to the community is incredibly cost prohibitive or does not rise to the challenge. As malware authors and distributors share code and prepackaged tool kits, the white hat community is dominated by solutions aimed at profit as opposed to augmenting capabilities available to the broader community. With that in mind, we are introducing our library for malware disassembly called Xori as an open source project. Xori is focused on helping reverse engineers analyze binaries, optimizing for time and effort spent per sample.
Xori is an automation-ready disassembly and static analysis library that consumes shellcode or PE binaries and provides triage analysis data. This Rust library emulates the stack, register states, and reference tables to identify suspicious functionality for manual analysis. Xori extracts structured data from binaries to use in machine learning and data science pipelines.
We will go over the pain-points of conventional open source disassemblers that Xori solves, examples of identifying suspicious functionality, and some of the interesting things we've done with the library. We invite everyone in the community to use it, help contribute and make it an increasingly valuable tool in this arms race.
The document discusses graphics programming and OpenGL. It introduces OpenGL, describing it as a hardware-independent interface consisting of over 700 commands. It outlines the OpenGL API, including primitive functions, attribute functions, and viewing functions. It also covers OpenGL primitives like points, lines, and polygons, as well as attributes like color. It explains orthographic and two-dimensional viewing in OpenGL.
The document describes the Volcano/Cascades query optimizer. It uses dynamic programming to efficiently search the large space of possible query execution plans. The optimizer represents queries as logical and physical operators connected by transformation and implementation rules. It explores the logical plan space and then builds physical plans by applying these rules. The search is guided by estimating physical operator costs. The optimizer memoizes partial results to avoid redundant work. This approach allows finding optimal execution plans in a principled way that scales to complex queries and optimizer extensions.
Mirko Damiani - An Embedded soft real time distributed system in Golinuxlab_conf
An embedded system usually involves low level languages like C and highly customized hardware. In this talk we will see a use case of a soft real time system which was developed taking a very different approach, written in Go. We will see what are the advantages of this choice, along with its limits.
This document discusses using Hadoop and MapReduce to efficiently read and write large amounts of data to and from Cassandra in bulk. It provides an overview of how SSTables are structured in Cassandra and how the SSTableInputFormat and SSTableRecordReader work with MapReduce to read SSTables column-by-column. It also describes how to write a custom output format and record writer to bulk write sorted and decorated keys to SSTables using SSTableSimpleWriter. The challenges of partitioning keys and sending SSTables to Cassandra after writing are also addressed. Open sourcing the KassandraMRHelper library is mentioned to simplify these bulk read and write workflows.
The document provides an introduction to analyzing the performance of algorithms. It discusses time complexity and space complexity, which measure the running time and memory usage of algorithms. Common asymptotic notations like Big-O, Big-Omega, and Big-Theta are introduced to concisely represent the growth rates of algorithms. Specific algorithms like selection sort and insertion sort are analyzed using these metrics. Recursion and recurrence relations are also covered as methods to analyze algorithm efficiency.
Industrial Applications of Arduino using Ladder LogicRobocraze
This document provides an overview of using Arduino boards in industrial applications. It discusses the Arduino Pro series of boards including the Portenta H7, Edge Control, Nicla Sense ME, Nano 33 BLE, and MKR family. It then introduces ladder logic programming, the basics of how it works, and demonstrates it using an online IDE called IECuino. Circuit diagrams and programming examples for turning on an LED using buttons are provided to illustrate ladder logic programming with Arduino. The document concludes with information on asking questions.
Expanding Access to Affordable At-Home EV Charging by Vanessa WarheitForth
Vanessa Warheit, Co-Founder of EV Charging for All, gave this presentation at the Forth Addressing The Challenges of Charging at Multi-Family Housing webinar on June 11, 2024.
What Could Be Behind Your Mercedes Sprinter's Power Loss on Uphill RoadsSprinter Gurus
Unlock the secrets behind your Mercedes Sprinter's uphill power loss with our comprehensive presentation. From fuel filter blockages to turbocharger troubles, we uncover the culprits and empower you to reclaim your vehicle's peak performance. Conquer every ascent with confidence and ensure a thrilling journey every time.
Understanding Catalytic Converter Theft:
What is a Catalytic Converter?: Learn about the function of catalytic converters in vehicles and why they are targeted by thieves.
Why are They Stolen?: Discover the valuable metals inside catalytic converters (such as platinum, palladium, and rhodium) that make them attractive to criminals.
Steps to Prevent Catalytic Converter Theft:
Parking Strategies: Tips on where and how to park your vehicle to reduce the risk of theft, such as parking in well-lit areas or secure garages.
Protective Devices: Overview of various anti-theft devices available, including catalytic converter locks, shields, and alarms.
Etching and Marking: The benefits of etching your vehicle’s VIN on the catalytic converter or using a catalytic converter marking kit to make it traceable and less appealing to thieves.
Surveillance and Monitoring: Recommendations for using security cameras and motion-sensor lights to deter thieves.
Statistics and Insights:
Theft Rates by Borough: Analysis of data to determine which borough in NYC experiences the highest rate of catalytic converter thefts.
Recent Trends: Current trends and patterns in catalytic converter thefts to help you stay aware of emerging hotspots and tactics used by thieves.
Benefits of This Presentation:
Awareness: Increase your awareness about catalytic converter theft and its impact on vehicle owners.
Practical Tips: Gain actionable insights and tips to effectively prevent catalytic converter theft.
Local Insights: Understand the specific risks in different NYC boroughs, helping you take targeted preventive measures.
This presentation aims to equip you with the knowledge and tools needed to protect your vehicle from catalytic converter theft, ensuring you are prepared and proactive in safeguarding your property.
Welcome to ASP Cranes, your trusted partner for crane solutions in Raipur, Chhattisgarh! With years of experience and a commitment to excellence, we offer a comprehensive range of crane services tailored to meet your lifting and material handling needs.
At ASP Cranes, we understand the importance of reliable and efficient crane operations in various industries, from construction and manufacturing to logistics and infrastructure development. That's why we strive to deliver top-notch solutions that enhance productivity, safety, and cost-effectiveness for our clients.
Our services include:
Crane Rental: Whether you need a crawler crane for heavy lifting or a hydraulic crane for versatile operations, we have a diverse fleet of well-maintained cranes available for rent. Our rental options are flexible and can be customized to suit your project requirements.
Crane Sales: Looking to invest in a crane for your business? We offer a wide selection of new and used cranes from leading manufacturers, ensuring you find the perfect equipment to match your needs and budget.
Crane Maintenance and Repair: To ensure optimal performance and safety, regular maintenance and timely repairs are essential for cranes. Our team of skilled technicians provides comprehensive maintenance and repair services to keep your equipment running smoothly and minimize downtime.
Crane Operator Training: Proper training is crucial for safe and efficient crane operation. We offer specialized training programs conducted by certified instructors to equip operators with the skills and knowledge they need to handle cranes effectively.
Custom Solutions: We understand that every project is unique, which is why we offer custom crane solutions tailored to your specific requirements. Whether you need modifications, attachments, or specialized equipment, we can design and implement solutions that meet your needs.
At ASP Cranes, customer satisfaction is our top priority. We are dedicated to delivering reliable, cost-effective, and innovative crane solutions that exceed expectations. Contact us today to learn more about our services and how we can support your project in Raipur, Chhattisgarh, and beyond. Let ASP Cranes be your trusted partner for all your crane needs!
Ever been troubled by the blinking sign and didn’t know what to do?
Here’s a handy guide to dashboard symbols so that you’ll never be confused again!
Save them for later and save the trouble!
Implementing ELDs or Electronic Logging Devices is slowly but surely becoming the norm in fleet management. Why? Well, integrating ELDs and associated connected vehicle solutions like fleet tracking devices lets businesses and their in-house fleet managers reap several benefits. Check out the post below to learn more.
EV Charging at MFH Properties by Whitaker JamiesonForth
Whitaker Jamieson, Senior Specialist at Forth, gave this presentation at the Forth Addressing The Challenges of Charging at Multi-Family Housing webinar on June 11, 2024.
6. Hardware Components
● Intel RealSense Camera -
○ Functions like a normal camera where the lens are able to
take color images.
○ Functions as a depth camera.
■ Camera uses software to compute the distance of each
pixel in an image
6
8. LIDAR
● Short for Light and Radar
● Similar to depth camera, LIDAR computes the
distance of points surrounding the RACECAR.
8
9. How does it work?
● Emits a laser and records the time it takes for the laster to
bounce back to find distance.
● Capable of rotating many times per second and able to update
the distance of all objects in all directions of the plane.
● Cannot detect objects above or below its view.
9
13. The Start-Update Paradigm
● start()
○ Function that is called once at the start of the code
○ Used for setup (Initial conditions)
● update()
○ Equivalent to an infinite while loop
○ Runs at a clock speed of ~60Hz, but may be slower due to
calculations done inside function
○ Has no memory! Do not save data inside this function!
13
14. Global Variables
● scope
○ Describes all locations where a variable can be accessed
○ If a variable is used inside of a function, it cannot be used outside
of a function!
● global
○ Keyword that allows variables to be accessed from everywhere
14
15. Why is this important?
● Variables used in the update() function are not saved!
● Memory allocated to the garbage collector (python only) after it has
been run, similar to erasing the function’s memory
● To “save” our data after a single instance, use a global variable
1. Create the global variable in the setup() function
2. Edit the variable in the update() function
3. Contents of the variable are now saved for later use!
15
16. Code Analysis
1. As time goes on, what happens to the value of variable foo?
2. What happens if we omit the global keyword from the start() function?
3. Why do we not need the global keyword to access foo from the bar()
function?
16
17. The Drive Module
● Most important function!
○ rc.drive.set_speed_angle(speed, angle)
● rc: The racecar object
● drive: A module inside the racecar library
● set_speed_angle: A function inside the drive module
● speed: Abstract value for speed of car (-1 to 1)
● angle: Abstract value for angle of car (-1 to 1)
17
18. The Drive Module
● speed: Abstract value for speed of car (-1 to 1)
○ -1 = Drive Backwards
○ 0 = Stop Moving
○ 1 = Drive Forwards
● angle: Abstract value for angle of car (-1 to 1)
○ -1 = Turn the wheels left
○ 0 = Turn the wheels straight
○ 1 = Turn the wheels right
18
19. More Modules
● rc.get_delta_time()
○ Returns the time in seconds since the last time the update()
function was called
● rc.drive.stop()
○ Stops the car in place (speed 0, angle 0)
19
21. The Controller Module
● rc.controller.Button.A
● rc.controller.Button.B
● rc.controller.Button.X
● rc.controller.Button.Y
● rc.controller.Button.RB (The right bumper)
● rc.controller.Button.LB (The left bumper)
● rc.controller.Button.LJOY (The Left Joystick button)
● rc.controller.Button.RJOY (The Right Joystick button)
21
22. The Controller Module
● Toggleable buttons
○ A, B, C, D (1, 2, 3, 4 on keyboard)
● Binary Values
○ 0 or 1 only! Pressed or not pressed
● rc.controller.is_down(button)
○ Returns true for every frame that the button is down
● rc.controller.was_pressed(button)
○ Returns true for the first time that the button is down
● rc.controller.was_released(button)
○ Returns true the frame after the button is no longer being pressed
22
23. The Controller Module
● Left and Right Triggers
○ Control Car Speed
○ 0 or 1 only! Pressed or not pressed
● rc.controller.get_trigger(trigger)
○ Returns the value (from 0-1) of the trigger
23
24. The Controller Module
● Left and Right Joystick
○ Joysticks have 2 axes, the x and y
○ Ranges from -1 to 1, where
■ -1 = left/down, 0 = center, and 1 = right/up
● rc.controller.get_joystick(joystick)
○ Returns the (x,y) value of the joystick
24
25. Code Analysis
1. What buttons on the controller are used in this script?
2. Where does the variable speed get its definition from?
3. What does the script do?
25
27. Let’s Double Check our Setup
● Open terminal. If you’re on windows type bash and press enter.
● Type racecar test and press enter
27
28. Run demo.py
1. Open up the racecar sim and press Begin Simulation (demo
level should be selected in the drop down menu)
2. Go back into your bash terminal and type “racecar cd” and
press enter
3. Then type ls
28
32. Jupyter Notebooks have space for
code and text
● Think like google collab, you can have text boxes with
instructions, or explanations of your code, and boxes with
runnable python code
○ Textboxes are called “markdowns”
○ Python boxes are “code”
32
33. Kernel
● The kernel is the “engine” of your code
● When you open a notebook document the associated kernel is
automatically launched
● When the notebook is executed, the kernel performs all the
computations
33
36. Text Formatting in markdown
● Use # to create a title
● Use ** to bold
● Use * to italicize
● To create a new line, press the spacebar twice before hitting
enter
36
40. Data Structures
● What is the purpose of data structures?
○ Store data in an organized manner
○ Establish a relationship between data points
● Why do we use data structures in our code?
○ Improve data retrieval algorithms
○ Organize data using sorting methods
○ Carry out a program operation
40
41. Direct Data Structures
● Arrays (C family, Java)
○ Immutable memory
○ Allocation of memory within hardware registers
● Python List
○ Mutable storage component
○ Flexible data types
● Python Dictionary
○ Hyper-flexible data storage
○ Cross-platform capability with JSON file type
41
42. Abstract Data Structures
● What is the purpose of abstract data?
● How is one piece of data related to another?
● How do we take data out of the structure?
● How is data organized within the structure?
● Why do we use ADTs?
42
43. Abstract Data Structures
● Linked List
○ Focuses on sequences of data
○ Each data “item” is connected to the next via a link
○ Can take out any item at any location via algorithm
● Queue
○ A “tunnel” of data
○ Can extract data only from the beginning and the end
● Stack
○ Think of it as a stack of cards
○ Can only take a card (data) from the top of the deck
43
44. Linked Lists
● Simple Linked List: Items travel forward only
● Double Linked List: Items travel both forwards and backwards
● Circular Linked List: Last item points back to the first item
Double Linked List
44
Circular Linked List
45. Linked Lists
● Insertion: Add an element to the beginning of a list
● Deletion: Delete an element at the end of a list
● Display: Display the complete list
● Search: Given a key, find an element in the list
● Delete: Given a key, remove an element from the list
45
Linked List Insertion
46. Queues
● FIFO structure (First In, First Out)
○ Visualize this as a one-way tunnel of data
○ “Nodes” only contain the data
○ The first node must be the first to leave the queue
○ The final node must be the final node to leave the queue
FIFO Queue
46
47. Queues
● Extremely important applications:
○ Process Management
○ Task Management
● If you have multiple tasks inside a queue, which task is
performed first? Which task is performed last?
FIFO Queue
47
48. Queues
48
● What operation is being
performed in the
following sequence of
events?
● How does this follow the
queue structure?
● How is this implemented
within the code?
49. Queues
49
● What operation is being performed in the following sequence of
events?
● How does this follow the queue structure?
● How is this implemented within the code?
50. Stack
50
● LIFO structure (Last In, First Out)
○ Visualize this as a stack of cards / stack of paper
○ “Nodes” only contain the data
○ The first node must be the last node to leave the queue
○ The final node must be the first node to leave the queue
LIFO Stack
51. Stack
51
● Some Applications of stacks
○ Operation Evaluation: RPN Solving
○ Function Calls: How does the compiler know to keep track
of function locations within the code?
LIFO Stack
52. Implementation of ADTs
52
● All ADTs can be represented as a algorithmically modified
version of a direct data type in Python!
○ Python Classes -> Linked List
○ Python List -> FIFO Queue
○ Python List -> Lifo Stack
56. Lab 1 Tasks
1. When the A button is pressed, drive in a circle.
2. When the B button is pressed, drive in a square
3. When the X button is pressed, drive in a figure-eight
4. When the Y button is pressed, drive in any shape of your choice
Keep in mind that all these buttons must work in a single script!
Hint: Use global variables and look at demo.py for an example!
56
57. Lab 1 Tips
1. Watch out for racecar acceleration! The first side of a square may not
contain the same movement script as the second side of the square.
2. How do we organize code in a script with multiple reused operations
such as in this lab? How can we make our overall code neater?
3. How can we use data structures and the relationship between data
points to provide the RACECAR with varying movements?
4. You may have to apply guess and check (quite a lot). Be patient! We’re
here to help if you need it!
57
58. Demo Environment Challenges
Make a copy of Lab1.py (call it Lab1challenge.py for example) and write some code to
solve the following problem statements (This is done in the MISC Level):
1. Write a script to make the racecar drive backwards into the wall of bricks in the
demo simulation when the B button is pressed. Stop the car when it and the wall
collides.
2. Write a script to make the racecar drive in an “S” shape through the 3 intro cones
without touching any of them. Drive the car up the ramp and stop the script right
before the car falls off the edge. Make the racecar perform this task when the X
button has been pressed. (You can program another button to drive the car off
the ramp and crash into the pyramid of bricks if you want)
58