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
| #!/usr/bin/env python3 | |
| import time | |
| from pyflix import Flix | |
| import math | |
| flix = Flix() | |
| print('Connected:', flix.connected) | |
| print('Mode:', flix.mode) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| /* ... */ | |
| void readIMU() { | |
| IMU.waitForData(); | |
| IMU.getGyro(gyro.x, gyro.y, gyro.z); | |
| IMU.getAccel(acc.x, acc.y, acc.z); | |
| // apply scale and bias | |
| acc = (acc - accBias) / accScale; | |
| gyro = gyro - gyroBias; | |
| // rotate to FRD |
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
| // Copyright (c) 2023 Oleg Kalachev <okalachev@gmail.com> | |
| // Repository: https://github.com/okalachev/flix | |
| // Motors output control | |
| // Motor: 8520 3.7V | |
| // ESC: KINGDUO Micro Mini 4A 1S Brushed Esc 3.6-6V | |
| #define MOTOR_0_PIN 12 // rear left | |
| #define MOTOR_1_PIN 13 // rear right | |
| #define MOTOR_2_PIN 14 // front right |
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
| // Upside down flight control | |
| #define DO_FLIP 0 | |
| void controlUpsideDown() { | |
| float modeWas = controls[RC_CHANNEL_MODE]; | |
| controls[RC_CHANNEL_MODE] = 0; // base on STAB mode | |
| interpretRC(); | |
| controls[RC_CHANNEL_MODE] = modeWas; | |
| mode = USER; // restore mode |
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
| // Copyright (c) 2024 Oleg Kalachev <okalachev@gmail.com> | |
| // Flip controller for the Flix drone https://github.com/okalachev/flix | |
| // Video and details: https://t.me/opensourcequadcopter/21 | |
| #define BOUNCE_TIME 0.6 | |
| #define ACCELERATE_TIME 0.07 | |
| #define BRAKE_TIME ACCELERATE_TIME | |
| enum { |
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
| #!/usr/bin/env python3 | |
| # Read and parse USB data from KingKong/LDARC Tiny X8 2.4G 8CH Radio Transmitter | |
| # Usage: ./tiny_rc.py <device_path> | |
| # Example: ./tiny_rc.py /dev/tty.usbserial-210 | |
| # Author: Oleg Kalachev <okalachev@gmail.com> | |
| # https://github.com/okalachev |
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
| #!/usr/bin/env python3 | |
| import rospy | |
| from geometry_msgs.msg import PoseStamped | |
| from gazebo_msgs.msg import LinkStates, ModelStates | |
| rospy.init_node('groundtruth_pose') | |
| pose_pub = rospy.Publisher('groundtruth', PoseStamped, queue_size=1) | |
| # uncomment to loop groundtruth pose to vision pose input: |
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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """MAVLink Monitor | |
| Monitor MAVLink packages from a serial port, UDP, or TCP link. | |
| Usage: | |
| mavlink_monitor.py [--dialect=<dialect>] [-b] <url> | |
| mavlink_monitor.py (-h | --help) | |
| Options: | |
| --dialect=<dialect> MAVLink dialect [default: common] |
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 requests | |
| r = requests.get('http://192.168.11.136:5000', params={'foo': 123}) | |
| print(r.text) |
NewerOlder