Dashboard (web/hand_web.py) - Record/replay panel driving g1_record_replay.py as a pty child: take library (replay/download/duplicate/rename/delete/upload/delete-all), pause & resume, and in-take key buttons that grey out in the --fingers modes the recorder ignores (measured: in touch mode the keys change nothing at all). - /api/restart is container-aware: it kills inspire_g1 and lets the supervisor relaunch it. It used to run manage.sh, which started a SECOND inspire_g1 beside the supervised one - two writers on one RS-485 bus - and never returned. - Shape/combo libraries take a .bak on every write, with an undo button. Both files are rewritten in full, so deleting the last entry was unrecoverable. recorder/ - The recorder lives in this project now: one source of truth for the CLI and the dashboard, with pause/resume added to replay. - record.sh picks a runtime by itself (a python with the SDK, the vendored SDK, or the inspire-hand container). bundle.sh packs a ~340KB portable kit. tools/ - preflight.sh: read-only readiness report for a new robot (hardware, docker, build prerequisites, per-robot settings) ending in an install-path verdict. - fetch_deps.sh: stage build dependencies, verifying the libs are aarch64. - export_ui.py: regenerate an embedding app's vendored copy of the UI. docker/ - build_image.sh resolves its dependencies from several layouts: deps/ inside the project, /usr/local, a source install prefix, or a ROS2 colcon workspace (where the idl headers live when /usr/local has none). - web/ is copied in the last layer, so dashboard edits skip the C++ rebuild. - restart=always, and start.sh always builds so an edit cannot silently run a stale image. deps/unitree_sdk2 is vendored so a robot that has never seen the SDK can build. Docs: README quickstart + embedding notes, SETUP_G1 corrected (that udev rule stopped creating /dev/inspire_* symlinks a while ago), ROBOT_README describing a live install.
93 lines
1.9 KiB
C++
93 lines
1.9 KiB
C++
#ifndef __UT_DECL_HPP__
|
|
#define __UT_DECL_HPP__
|
|
|
|
#include <unistd.h>
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdint.h>
|
|
#include <errno.h>
|
|
#include <exception>
|
|
#include <execinfo.h>
|
|
#include <sched.h>
|
|
#include <signal.h>
|
|
#include <string.h>
|
|
#include <strings.h>
|
|
#include <arpa/inet.h>
|
|
#include <ifaddrs.h>
|
|
#include <sys/mman.h>
|
|
#include <sys/stat.h>
|
|
#include <sys/statvfs.h>
|
|
#include <sys/types.h>
|
|
#include <sys/time.h>
|
|
#include <sys/socket.h>
|
|
#include <sys/un.h>
|
|
#include <sys/sysinfo.h>
|
|
#include <sys/syscall.h>
|
|
#include <sys/resource.h>
|
|
#include <sys/timerfd.h>
|
|
#include <net/if.h>
|
|
#include <netinet/in.h>
|
|
#include <netdb.h>
|
|
#include <time.h>
|
|
#include <poll.h>
|
|
#include <pthread.h>
|
|
#include <pwd.h>
|
|
#include <limits.h>
|
|
#include <fcntl.h>
|
|
#include <dirent.h>
|
|
#include <utime.h>
|
|
#include <atomic>
|
|
#include <string>
|
|
#include <iostream>
|
|
#include <sstream>
|
|
#include <typeinfo>
|
|
#include <list>
|
|
#include <vector>
|
|
#include <set>
|
|
#include <map>
|
|
#include <unordered_map>
|
|
#include <functional>
|
|
#include <iomanip>
|
|
#include <memory>
|
|
#include <regex>
|
|
|
|
#ifdef __GLIBC__
|
|
#define UT_UNLIKELY(x) __builtin_expect(!!(x), 0)
|
|
#define UT_LIKELY(x) __builtin_expect(!!(x), 1)
|
|
#else
|
|
#define UT_UNLIKELY(x) (x)
|
|
#define UT_LIKELY(x) (x)
|
|
#endif//__GLIBC__
|
|
|
|
#define __UT_CAT(x, y) x##y
|
|
#define UT_CAT(x, y) __UT_CAT(x, y)
|
|
|
|
#define __UT_STR(x) #x
|
|
#define UT_STR(x) __UT_STR(x)
|
|
|
|
#define UT_QUEUE_MAX_LEN INT_MAX
|
|
#define UT_PATH_MAX_LEN 1024
|
|
#define UT_THREAD_NAME_MAX_LEN 16
|
|
|
|
#define UT_DECL_ERR(name, code, desc) \
|
|
const int32_t name = code; const std::string name##_DESC = desc;
|
|
|
|
#define UT_DESC_ERR(name) name##_DESC
|
|
|
|
#ifndef SYS_gettid
|
|
#define SYS_gettid __NR_gettid
|
|
#endif//SYS_gettid
|
|
|
|
#define UT_SAFE_DEL(x) \
|
|
if ((x) != NULL) { delete (x); (x) = NULL; }
|
|
|
|
namespace unitree
|
|
{
|
|
namespace common
|
|
{
|
|
static const std::string UT_EMPTY_STR = "";
|
|
}
|
|
}
|
|
|
|
#endif//__UT_DECL_HPP__
|