This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Sat Jun 1 17:49:53 2024 | |
| @author: Vojtech Vrba ([email protected]) | |
| Required extra packages: rosbags | |
| """ | |
| from pathlib import Path | |
| from rosbags.highlevel import AnyReader |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Mon Jun 24 18:16:30 2024 | |
| @author: Vojtech Vrba ([email protected]) | |
| Script for extraction of events compressed in RAW file with EVT3 format to a CSV file. | |
| References: | |
| - https://docs.prophesee.ai/stable/data/encoding_formats/evt3.html#chapter-data-encoding-formats-evt3 | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Tue Aug 20 09:14:55 2024 | |
| @author: Vojtech Vrba ([email protected]) | |
| Simple socket client. | |
| Connects to a server with an IP given by the current SSH connection, and with a port 12345. | |
| Sends a sample message every 1 second and prints the server's response. | |
| """ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import queue | |
| import threading | |
| import time | |
| import uuid | |
| # Create two queues: one for requests and one for responses | |
| request_queue = queue.Queue() | |
| response_queue = queue.Queue() | |
| # Callback function that puts a request into the request queue and waits for the response |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| template<typename T=double> | |
| std::array<std::complex<T>, 4> solve_quartic_roots(std::complex<T> c4, std::complex<T> c3, std::complex<T> c2, std::complex<T> c1, std::complex<T> c0) const { | |
| c3 /= c4; c2 /= c4; c1 /= c4; c0 /= c4; | |
| const T eps = std::numeric_limits<T>::epsilon(); | |
| const T inv2 = 0.5, inv3 = 1.0/3.0, inv27 = 1.0/27.0; | |
| auto a4q = 0.25 * c3; | |
| auto a4q2 = a4q * a4q; | |
| auto a4q4 = a4q2 * a4q2; | |
| auto p = 3.0 * a4q2 - inv2 * c2; | |
| auto q = c3 * a4q2 - c2 * a4q + inv2 * c1; |
OlderNewer