Skip to content

Instantly share code, notes, and snippets.

View GPrathap's full-sized avatar
🙃
When the right time comes

Geesara Prathap Kulathunga GPrathap

🙃
When the right time comes
View GitHub Profile
<?xml version='1.0'?>
<sdf version='1.4'>
<model name='sjtu_drone'>
<plugin name='simple_drone' filename='libplugin_drone.so'>
<bodyName>base_link</bodyName>
<imuTopic>/drone/imu</imuTopic>
<rollpitchProportionalGain>10.0</rollpitchProportionalGain>
<rollpitchDifferentialGain>5.0</rollpitchDifferentialGain>
<rollpitchLimit>0.5</rollpitchLimit>
<yawProportionalGain>2.0</yawProportionalGain>
import casadi as ca
import tensorflow.compat.v1 as tf
tf.disable_v2_behavior()
class TensorFlowEvaluator(ca.Callback):
def __init__(self,t_in,t_out,session, opts={}):
"""
t_in: list of inputs (tensorflow placeholders)
t_out: list of outputs (tensors dependent on those placeholders)
session: a tensorflow session
import casadi as ca
import tensorflow as tf
from casadi import Sparsity
import gpflow
import numpy as np
class TensorFlowEvaluator(ca.Callback):
def __init__(self, t_in, t_out, model, set_init=False, opts={}):
self.set_init = set_init