MAVLink Switch is configured using a configuration YAML file, containing endpoints and rules sets.
This file contains 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 -*- | |
import time | |
import threading | |
import pigpio | |
import collections | |
import numpy | |
import rospy | |
from sensor_msgs.msg import Range |
This file contains 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 rospy | |
from clever import srv | |
from std_srvs.srv import Trigger | |
rospy.init_node('testflight') | |
navigate = rospy.ServiceProxy('navigate', srv.Navigate) | |
land = rospy.ServiceProxy('land', Trigger) | |
This file contains 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
/* | |
* Description text | |
* Copyright (C) 2018 Copter Express Technologies | |
* | |
* Author: Ivan Petrov <ipetrov@gmail.com> | |
* | |
* Distributed under MIT License (available at https://opensource.org/licenses/MIT). | |
* The above copyright notice and this permission notice shall be included in all | |
* copies or substantial portions of the Software. | |
*/ |
This file contains 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
#include <iostream> | |
using namespace std; | |
int i = 11; | |
int j = 22; | |
void invoke(void (*callback)(void)) | |
{ | |
callback(); |
This file contains 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/python | |
import rospy | |
import thread | |
import sys | |
import math | |
from mavros_msgs.msg import RCIn | |
from clever import srv | |
from time import sleep | |
from mavros_msgs.srv import SetMode | |
from mavros_msgs.srv import CommandBool |
This file contains 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
function quatFromEuler(roll, pitch, yaw) { | |
var c1 = Math.cos(x / 2); | |
var c2 = Math.cos(y / 2); | |
var c3 = Math.cos(z / 2); | |
var s1 = Math.sin(x / 2); | |
var s2 = Math.sin(y / 2); | |
var s3 = Math.sin(z / 2); | |
var x = s1 * c2 * c3 + c1 * s2 * s3; | |
var y = c1 * s2 * c3 - s1 * c2 * s3; |
This file contains 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
rostopic pub -r 5 /mavros/setpoint_position/local geometry_msgs/PoseStamped "header: | |
seq: 0 | |
stamp: | |
secs: 0 | |
nsecs: 0 | |
frame_id: '' | |
pose: | |
position: | |
x: 0.0 | |
y: 0.0 |
This file contains 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
from mongo import get_db | |
def is_next_try(session, result): | |
res = len(session['tries']) == result['tryNumber'] and \ | |
(session['addr'] is None or session['addr'] == result['addr']) and \ | |
not session['tries'][-1].get('last') and \ | |
session['tries'][-1]['spent'] < result['spent'] | |
if not res: return False | |
for id in session['tries'][-1]['answers']: |