Skip to content

Instantly share code, notes, and snippets.

View dbaldwin's full-sized avatar

Dennis Baldwin dbaldwin

View GitHub Profile
@dbaldwin
dbaldwin / example_static_pose.py
Created March 30, 2023 00:30
Go1 Static Pose Example
#!/usr/bin/python
import sys
import time
import math
import numpy as np
sys.path.append('../lib/python/amd64')
import robot_interface as sdk
@dbaldwin
dbaldwin / gist:e05df6ffea978ac97074577deeccc60f
Created March 22, 2023 19:05
goto_location_ned fcm error
fcm_1 | 2023-03-22 18:58:03.637 | ERROR | __main__:action_dispatcher:180 - ERROR IN MAIN LOOP
fcm_1 | Traceback (most recent call last):
fcm_1 |
fcm_1 | File "/app/fcc_control.py", line 443, in <module>
fcm_1 | asyncio.run(control.run())
fcm_1 | │ │ │ └ <function ControlManager.run at 0x7f8253cb80>
fcm_1 | │ │ └ <__main__.ControlManager object at 0x7f825937c0>
fcm_1 | │ └ <function run at 0x7f847c4ee0>
fcm_1 | └ <module 'asyncio' from '/usr/local/lib/python3.9/asyncio/__init__.py'>
fcm_1 |
@dbaldwin
dbaldwin / mission.json
Last active October 23, 2023 22:49
Dennis AVR 2023 Waypoint Mission Test
# Launch AVR Sim
root@ubuntu:~/AVR-2022/VMC# ./start.py -s -l run simulator mqtt fcm web
# Publish to FCM topic on MQTT Broker
avr/fcm/actions
# Absolute
{"action":"upload_mission","payload":{"waypoints":[{"type":"takeoff", "lat": 32.8085506, "lon": -97.1563441, "alt": 3},{"type":"goto","lat":32.8085769115908,"lon":-97.15634413537362,"alt":2},{"type":"goto","lat":32.808576911586705,"lon":-97.15631207121733,"alt":2},{"type":"goto","lat":32.80854996212819,"lon":-97.15631207121733,"alt":2},{"type":"goto","lat":32.80854996212411,"lon":-97.15634413536391,"alt":2},{"type":"land", "lat":32.80854996212411,"lon":-97.15634413536391, "alt": 0}]}}
# Relative
# Update CMakeLists in ~/catkin_ws/src/unitree_ros/unitree_controller
catkin_install_python(PROGRAMS scripts/joint_mover.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
#!/usr/bin/env python
import rospy
from sensor_msgs.msg import JointState
from std_msgs.msg import Header
docker run -p 6080:80 --shm-size=512m --name ros_go1 -d tiryoh/ros-desktop-vnc:melodic
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
sudo apt install ros-melodic-joint-state-publisher-gui
mkdir -p ~/catkin_ws/src
docker run -p 6080:80 --shm-size=512m tiryoh/ros2-desktop-vnc:foxy
# Go to http://localhost:6080 and open a terminal
# Menu > System Tools > MATE Terminal
sudo apt update
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
@dbaldwin
dbaldwin / gist:70fb53d88877f5ecfeadd646e225456a
Created January 14, 2023 21:44
PX4, MAVROS, Gazebo Sim with ROS Noetic (Work in Progress)
docker run -p 6080:80 --shm-size=512m --name px4-gazebo-mavros -d dorowu/ubuntu-desktop-lxde-vnc:latest
http://localhost:6080
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4EB27DB2A3B88B8B
sudo apt update
sudo apt install git -y
@dbaldwin
dbaldwin / ubuntu_sim_ros_noetic.sh
Last active May 31, 2024 15:09
Ubuntu 20 LTS, ROS Noetic, Gazebo 11 MAVROS
#!/bin/bash
## Bash script for setting up ROS Noetic (with Gazebo 11) development environment for PX4 on Ubuntu LTS (20.04).
## It installs the common dependencies for all targets (including Qt Creator)
##
## Installs:
## - Common dependencies libraries and tools as defined in `ubuntu_sim_common_deps.sh`
## - ROS Noetic (including Gazebo11)
## - MAVROS
@dbaldwin
dbaldwin / gist:eb2120bb5462372d2daa5928ba063f20
Created December 11, 2022 21:49
dRehmFlight Nemo Bicopter Tiltrotor
// https://www.rcgroups.com/forums/showpost.php?p=48605917&postcount=299
//Arduino/Teensy Flight Controller - dRehmFlight
//Author: Nicholas Rehm
//Project Start: 1/6/2020
//Version: Beta 1.2
/*
*
* If you are using this for an academic or scholarly project, please credit me in any presentations or publications: