### Clone OM1 Repository and Setup Environment Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Clones the OM1 GitHub repository, initializes submodules, creates a virtual environment using 'uv', and prepares the project for setup. This is the initial step for installing OM1. ```bash git clone https://github.com/openmind/OM1.git cd OM1 git submodule update --init uv venv ``` -------------------------------- ### Run Spot Agent Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Starts the OM1 Spot Agent using the 'uv' command. This command also handles the resolution and installation of project dependencies on the initial execution. ```bash uv run src/run.py spot ``` -------------------------------- ### OM1 Agent Interaction Example Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Illustrates the input, available actions, and LLM output for the OM1 Spot Agent. It shows how the agent perceives its environment, the commands it can execute (move, speak, emotion), and the generated response. ```text Object Detector INPUT // START You see a person in front of you. You also see a laptop. // END AVAILABLE ACTIONS: command: move A movement to be performed by the agent. Effect: Allows the agent to move. Arguments: Allowed values: 'stand still', 'sit', 'dance', 'shake paw', 'walk', 'walk back', 'run', 'jump', 'wag tail' command: speak Words to be spoken by the agent. Effect: Allows the agent to speak. Arguments: command: emotion A facial expression to be performed by the agent. Effect: Performs a given facial expression. Arguments: Allowed values: 'cry', 'smile', 'frown', 'think', 'joy' What will you do? Command: INFO:httpx:HTTP Request: POST https://api.openmind.org/api/core/openai/chat/completions "HTTP/1.1 200 OK" INFO:root:OpenAI LLM output: commands=[Command(type='move', value='wag tail'), Command(type='speak', value="Hi there! I see you and I'm excited!"), Command(type='emotion', value='joy')] ``` -------------------------------- ### Start Zenoh Daemon Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/zenoh.md Starts the Zenoh daemon (zenohd) with a specified configuration file. This is typically run in a separate terminal window. ```bash zenohd -c robot_storage.json5 ``` -------------------------------- ### Install PortAudio Library Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Installs the 'portaudio' library, which is required for audio input and output functionality in OM1. Installation commands are provided for both macOS using Homebrew and Linux using apt-get. ```bash # Mac brew install portaudio # Linux sudo apt-get update sudo apt-get install portaudio19-dev python-all-dev ``` -------------------------------- ### Launch Gazebo Simulator Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/README.md Launches the Gazebo simulator for the unitree_guide project. This command starts the simulation environment where the quadruped robot can be controlled. ```bash roslaunch unitree_guide gazeboSim.launch ``` -------------------------------- ### Install FFmpeg Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Installs FFmpeg, a crucial tool for video processing in the OM1 project. Instructions are provided for macOS using Homebrew and for Linux using apt-get. ```bash # Mac brew install ffmpeg # Linux sudo apt-get update sudo apt-get install ffmpeg ``` -------------------------------- ### Run ROS Node with C/C++ Example Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/unitree_actuator_sdk/ReadMe.md Launches the C/C++ motor control ROS node. Requires starting the ROS master and sourcing the setup file before running the node. ```bash roscore ``` ```bash sudo su source devel/setup.bash rosrun unitree_motor_ctrl unitree_motor_ctrl_node ``` -------------------------------- ### Configure API Key for OM1 Source: https://github.com/openmind/om1/blob/main/mintlify/developing/1_get-started.mdx Sets the OpenMind API key either by adding it to the /config/spot.json file or by creating a .env file in the project directory with the OM_API_KEY variable. ```bash # /config/spot.json ... "api_key": "om1_live_..." ... # .env file OM_API_KEY=om1_live_... ``` -------------------------------- ### Run ROS Node with Python Example Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/unitree_actuator_sdk/ReadMe.md Launches the Python motor control ROS node. Requires starting the ROS master and sourcing the setup file before running the node. ```bash roscore ``` ```bash sudo su source devel/setup.bash rosrun unitree_motor_ctrl check.py ``` -------------------------------- ### Install uv Package Manager Source: https://github.com/openmind/om1/blob/main/docs/robotics/turtlebot4_zenoh.mdx Installs the 'uv' Python package manager using a curl script. 'uv' is used later to install and run OM1. ```bash curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Example CycloneDDS 'listtopics' Output Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/unitree_go2_quadruped.mdx This represents the typical output from the CycloneDDS 'listtopics' example, showing discovered DDS topics, their internal IDs, and associated message types. This output confirms successful DDS communication. ```text alive: df4efe0e:812a86b1:647728be:c1f7a312 rt/lf/lowstate unitree_go::msg::dds_::LowState_\nalive: c3a612c2:99b329c6:22510d3d:d385e1e6 rt/api/motion_switcher/response unitree_api::msg::dds_::Response_\nalive: 78b1db7f:622f2dfe:fb4d9e8f:987083f0 rt/api/motion_switcher/request unitree_api::msg::dds_::Request_\nalive: 84978827:0d460527:b4f054ac:e546468a rt/api/gpt/request unitree_api::msg::dds_::Request_\nalive: 23d08ca2:bea974c8:d44a51c0:d2c3cf27 rt/api/gpt/response unitree_api::msg::dds_::Response_\nalive: ac63fb3a:bb2b8a5b:c1a42ed4:bf470e91 rt/gptflowfeedback std_msgs::msg::dds_::String_\nalive: fc5e351e:00f676bb:236ec7d8:da9f115b rt/api/sport/request unitree_api::msg::dds_::Request_\nalive: b1be3e06:596bd40d:8ef51579:50245496 rt/api/sport/response unitree_api::msg::dds_::Response_\nalive: da491277:72915ef6:c7407d32:fb2ce5fa rt/api/videohub/request unitree_api::msg::dds_::Request_\nalive: 9072826b:ffcd904a:ba8a0092:792335d7 rt/api/videohub/response unitree_api::msg::dds_::Response_\nalive: 077c7627:183247d6:2a698bc3:f8df4577 rt/utlidar/range_info geometry_msgs::msg::dds_::PointStamped_\nalive: 188652eb:bf16b2a2:dbc4ac3a:af71d576 rt/lf/sportmodestate unitree_go::msg::dds_::SportModeState_\nalive: 23dd31a3:b6828a1e:cb390d4f:1a9a1d87 rt/gpt_cmd std_msgs::msg::dds_::String_\nalive: c53b329d:7aa96ef0:80c9d35d:d8459b42 rt/api/vui/request unitree_api::msg::dds_::Request_\nalive: 87b1b32e:d9ec09ce:b928db03:eaf5f28f rt/api/vui/response unitree_api::msg::dds_::Response_\nalive: 4d0e307c:c20328f4:0dd1efc5:7ca1e56c rt/mf/sportmodestate unitree_go::msg::dds_::SportModeState_\nalive: 083d7026:d0ac857d:ad12c938:2b98f89a rt/utlidar/height_map_array unitree_go::msg::dds_::HeightMap_\nalive: 06f05795:ebf8f837:fb736321:16cd723d rt/wirelesscontroller unitree_go::msg::dds_::WirelessController_\nalive: 3f2bd6b9:22da59bf:ca7b2ec6:2ab25639 rt/api/obstacles_avoid/response unitree_api::msg::dds_::Response_\nalive: 3392a31a:eec44934:a234ee4e:e9b0645d rt/api/obstacles_avoid/request unitree_api::msg::dds_::Request_\nalive: 9c38174a:b9719d10:5ceaf5d6:58cad182 rt/api/config/request unitree_api::msg::dds_::Request_\nalive: 243d1a9a:beb73e99:a7438b89:8881ba7a rt/api/config/response unitree_api::msg::dds_::Response_\nalive: 1ffd3f85:9e4cbd10:b07286be:95b31d4c rt/api/sport_lease/response unitree_api::msg::dds_::Response_\nalive: ab8cdb14:cb59d2c1:7dba035c:424e94c5 rt/api/sport_lease/request unitree_api::msg::dds_::Request_\nalive: 232c059d:f9650b34:ee28aae8:da3ab7d6 rt/lowcmd unitree_go::msg::dds_::LowCmd_\nalive: a9cf187b:009f8f56:bfdf14b4:c2525358 rt/sportmodestate unitree_go::msg::dds_::SportModeState_\nalive: 282f8688:c4486d0f:ae222a71:f33dc3b9 rt/lowstate unitree_go::msg::dds_::LowState_\nalive: e553c276:3cdb6d66:52898f8b:59b25a8c rt/config_change_status unitree_go::msg::dds_::ConfigChangeStatus_\nalive: 699e3ec7:13005f67:4165667f:a84d4593 rt/webrtcreq std_msgs::msg::dds_::String_\nalive: 921b611e:2649a718:a59ee5cd:22dc2309 rt/webrtcres std_msgs::msg::dds_::String_ ``` -------------------------------- ### Start Zenoh Daemon Source: https://github.com/openmind/om1/blob/main/docs/robotics/zenoh.md Starts the Zenoh daemon (`zenohd`) with a specified configuration file (`robot_storage.json5`). This command should be run in a separate terminal window within the OM1 project directory. ```bash # inside OM1 zenohd -c robot_storage.json5 ``` -------------------------------- ### Install uv Package Manager Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Installs the 'uv' package manager and virtual environment tool using either Homebrew on macOS or a script on Linux. 'uv' is essential for managing Python packages and environments for the OM1 project. ```bash # Mac brew install uv # Linux curl -LsSf https://astral.sh/uv/install.sh | sh ``` -------------------------------- ### Source ROS Workspace Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/README.md Sources the ROS workspace's setup file to make ROS packages available in the current terminal session. This is a prerequisite for running ROS-related commands. ```bash source ./devel/setup.bash ``` -------------------------------- ### Webcam Debugging Source: https://github.com/openmind/om1/blob/main/docs/robotics/turtlebot4_zenoh.mdx Commands for debugging webcam connectivity and streams. This involves listing USB devices, installing necessary utilities, and capturing video streams with specific parameters. ```bash lsusb sudo apt install v4l-utils v4l2-ctl --list-devices v4l2-ctl -d /dev/video0 --stream-mmap --all ``` -------------------------------- ### Install Docker and Run OM1 Bridge on TurtleBot4 Source: https://github.com/openmind/om1/blob/main/docs/robotics/turtlebot4_zenoh.mdx Installs Docker on the TurtleBot4's Raspberry Pi and starts the Zenoh bridge service using docker-compose. This enables the TurtleBot4 to communicate with other Zenoh-enabled computers and forward ROS2 messages. ```bash sudo docker compose -f docker-compose.yaml up -d ``` ```yaml services: zenoh-bridge-turtlebot4: image: openmindagi/turtlebridge container_name: zenoh-bridge-turtlebot4 network_mode: "host" restart: always ``` -------------------------------- ### Run Custom or Pre-configured Agents Source: https://github.com/openmind/om1/blob/main/mintlify/developing/1_get-started.mdx Executes pre-configured agents or custom agents by specifying the agent name after 'uv run src/run.py'. For example, to run the 'conversation' agent. ```bash # Run conversation agent uv run src/run.py conversation # Run a custom agent uv run src/run.py ``` -------------------------------- ### Configure OM1 API Key Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Sets the OpenMind API key for OM1. The key can be added to the '/config/spot.json' file or set as an environment variable 'OM_API_KEY' in a '.env' file in the project directory. Using a placeholder key will result in errors. ```bash # /config/spot.json ... "api_key": "om1_live_..." ... # Or, in .env file: OM_API_KEY=om1_live_... ``` -------------------------------- ### Install hidapi on Linux Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_go2_quadruped.mdx Installs the hidapi library and its development dependencies on Debian-based Linux systems using apt-get. ```bash sudo apt-get update sudo apt-get install python-dev libusb-1.0-0-dev libudev-dev libhidapi-dev ``` -------------------------------- ### Install System Dependencies on Raspberry Pi Source: https://github.com/openmind/om1/blob/main/docs/robotics/turtlebot4_zenoh.mdx Installs necessary system packages on the Raspberry Pi, including audio-related packages (pulseaudio, pulseaudio-utils) and ffmpeg for media processing, and portaudio19-dev for audio development. ```bash sudo apt install pulseaudio pulseaudio-utils ffmpeg portaudio19-dev python-all-dev ``` -------------------------------- ### Build Unitree Guide Project Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/README.md Builds the unitree_guide project within a ROS workspace. Ensure you are in the correct directory before execution. This command compiles the ROS packages. ```bash catkin_make ``` -------------------------------- ### Start OM1 Quadruped Simulation Source: https://github.com/openmind/om1/blob/main/mintlify/examples/gazebo.mdx Launches the OM1 simulation for a quadruped robot. This command starts the simulation environment and requires correct API key configuration in the `config/quadruped_sim.json5` file or environment variables. ```bash uv run src/run.py quadruped_sim ``` -------------------------------- ### Start Pulseaudio Daemon Manually Source: https://github.com/openmind/om1/blob/main/docs/robotics/turtlebot4_zenoh.mdx Starts the Pulseaudio daemon manually if it's not running, which is indicated by a 'Connection refused' error when using 'pactl'. The '-D' flag runs it in the background. ```bash pulseaudio --start -D ``` -------------------------------- ### Compile and Run CycloneDDS listtopics Example Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_go2_quadruped.mdx This snippet compiles and executes the `listtopics` example provided by CycloneDDS to verify DDS connectivity and list available topics. On macOS, you may need to grant network permissions. ```bash cd $HOME/Documents/GitHub/cyclonedds/install/share/CycloneDDS/examples/listtopics cmake . cmake --build . ./listtopics ``` -------------------------------- ### Install and Run pygpsclient Source: https://github.com/openmind/om1/blob/main/docs/robotics/gps_compass.mdx Commands to set up a Python virtual environment, install the pygpsclient package, and launch the application for RTK data plotting. ```bash python3 -m venv pygpsclient source pygpsclient/bin/activate python3 -m pip install --upgrade pygpsclient pygpsclient ``` -------------------------------- ### Run Cubly Emotion Detection Example Source: https://github.com/openmind/om1/blob/main/docs/examples/smart_toy.mdx Executes the main script for the Cubly emotion detection example. This command initiates the system, which includes webcam and audio processing, and may involve downloading necessary AI/ML models. It requires the system to have Python and associated libraries installed. ```bash uv run src/run.py cubly ``` -------------------------------- ### Install and Build CycloneDDS Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_go2_quadruped.mdx This snippet shows how to clone the CycloneDDS repository, build it with CMake, and install it. It's essential for enabling DDS communication. ```bash git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x cd cyclonedds && mkdir build install && cd build cmake .. -DCMAKE_INSTALL_PREFIX=../install -DBUILD_EXAMPLES=ON cmake --build . --target install ``` -------------------------------- ### Install CycloneDDS Python Module Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_go2_quadruped.mdx Installs the CycloneDDS Python module using uv, referencing the pyproject.toml file with an extra argument for DDS. ```bash uv pip install -r pyproject.toml --extra dds ``` -------------------------------- ### CMakeLists.txt: Installation Rules Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_legged_msgs/CMakeLists.txt This snippet specifies the installation rules for the package. It installs header files from the `include/unitree_legged_msgs/` directory to the appropriate destination within the Catkin package structure. ```cmake # Mark topic names header files for installation install( DIRECTORY include/${PROJECT_NAME}/ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} FILES_MATCHING PATTERN "*.h" ) ``` -------------------------------- ### Run Python Example on Windows Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/unitree_actuator_sdk/ReadMe.md Executes the Python motor control example script on Windows. Assumes the script is in the 'script' directory. ```bash cd script check.py ``` -------------------------------- ### Python Integration with VILA VLM API Source: https://github.com/openmind/om1/blob/main/mintlify/api-reference/endpoints/vila_vlm.mdx Example Python code demonstrating how to initialize, start, and process messages from the VILA VLM API using the `om1_vlm` library. ```APIDOC ## Python Integration with VILA VLM ### Description This code snippet shows how to use the `om1_vlm` library to connect to the VILA VLM API, send messages, and register a callback for receiving analysis results. ### Method Python Script ### Code ```python from om1_vlm import VideoStream import ws # Assuming 'ws' is a WebSocket client library import time # Initialize the VILA VLM API client # Replace '' with your actual API key ws_client = ws.Client(url="wss://api-vila.openmind.org?api_key=") # Initialize the VideoStream wrapper vlm = VideoStream(ws_client.send_message, fps=30) # Start the WebSocket client and VLM stream ws_client.start() vlm.start() # Register a callback to handle incoming messages (analysis results) ws_client.register_message_callback(lambda msg: print(f"Received message: {msg}")) # Keep the script running to maintain the connection try: while True: time.sleep(1) except KeyboardInterrupt: print("Stopping VLM client...") ws_client.stop() vlm.stop() ``` ### Usage Notes - Ensure the `om1_vlm` library and a compatible WebSocket client library (like `ws`) are installed. - Replace `` with your valid API key. - The `register_message_callback` function allows you to define how to process the analysis results received from the VLM API. ``` -------------------------------- ### Install PortAudio Development Headers Source: https://github.com/openmind/om1/blob/main/docs/developing/9_troubleshooting_guide.mdx Fixes build errors related to missing 'portaudio.h' by installing the PortAudio development headers. This is necessary for projects that utilize PortAudio for audio input/output. ```shell sudo apt-get update sudo apt-get install portaudio19-dev ``` -------------------------------- ### Build and Source Catkin Workspace Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_ros/robots/go2_description/README.md Builds the catkin workspace, compiling all packages within it, and then sources the setup script to make the ROS packages available in the current terminal session. ```bash catkin build source //devel/setup.bash ``` -------------------------------- ### Test Zenoh Daemon Help Source: https://github.com/openmind/om1/blob/main/docs/robotics/zenoh.md Displays the help information for the Zenoh daemon (`zenohd`), useful for understanding available commands and options. ```bash zenohd --help ``` -------------------------------- ### Install Dependencies for MacOS and Linux Source: https://github.com/openmind/om1/blob/main/README.md Provides commands for installing necessary dependencies on macOS using Homebrew and on Linux using apt-get. Dependencies include portaudio and ffmpeg. ```bash # For MacOS brew install portaudio ffmpeg # For Linux sudo apt-get update sudo apt-get install portaudio19-dev python-dev ffmpeg ``` -------------------------------- ### Zenoh REST API Operations Source: https://github.com/openmind/om1/blob/main/docs/robotics/zenoh.md Examples of using curl to interact with the Zenoh REST API for publishing and retrieving key-value pairs. ```APIDOC ## POST /robot ### Description Publishes a value to the '/robot' key, which will be stored under the configured Zenoh backend root directory. ### Method PUT ### Endpoint http://localhost:9500/robot ### Parameters #### Request Body - **value** (string) - Required - The string value to publish. ### Request Example ```bash curl -X PUT -d "HELLO WORLD" http://localhost:9500/robot ``` ## POST /robot/audio ### Description Publishes a value to the '/robot/audio' key, which will be stored under the configured Zenoh backend root directory. ### Method PUT ### Endpoint http://localhost:9500/robot/audio ### Parameters #### Request Body - **value** (string) - Required - The string value to publish. ### Request Example ```bash curl -X PUT -d "HELLO WORLD A" http://localhost:9500/robot/audio ``` ## GET /robot ### Description Retrieves the latest value associated with the '/robot' key from the Zenoh backend. ### Method GET ### Endpoint http://localhost:9500/robot ### Response #### Success Response (200) - **value** (string) - The latest string value for the '/robot' key. ### Response Example ```json { "value": "HELLO WORLD" } ``` ## GET /robot/audio ### Description Retrieves the latest value associated with the '/robot/audio' key from the Zenoh backend. ### Method GET ### Endpoint http://localhost:9500/robot/audio ### Response #### Success Response (200) - **value** (string) - The latest string value for the '/robot/audio' key. ### Response Example ```json { "value": "HELLO WORLD A" } ``` ``` -------------------------------- ### Install ffmpeg on Ubuntu Source: https://github.com/openmind/om1/blob/main/mintlify/examples/gazebo.mdx Installs the ffmpeg package on Ubuntu systems, which is required for streaming simulated video feeds in the Gazebo simulation. ```bash sudo apt-get install ffmpeg ``` -------------------------------- ### List CycloneDDS Topics Output Example Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/unitree_g1_humanoid.mdx Example output from the 'listtopics' executable, showing discovered DDS topics, their internal IDs, and the corresponding ROS 2 message types. ```text alive: ea9d27e0:9769a902:84fcfb59:2b6083bc rt/lf/lowstate unitree_go::msg::dds_::LowState_ alive: 3b07fe34:41cac3a8:9f12e6e6:f719133e rt/api/motion_switcher/response unitree_api::msg::dds_::Response_ alive: eec56342:f93120c6:bab05432:a1b4a0f8 rt/api/motion_switcher/request unitree_api::msg::dds_::Request_ alive: 8e9380cf:5e6f9214:9d5e768f:dfd6d595 rt/utlidar/voxel_map sensor_msgs::msg::dds_::PointCloud2_ alive: fee410f9:eaab3e20:b1c6a349:ac7b8b8c rt/utlidar/voxel_map_compressed unitree_go::msg::dds_::VoxelMapCompressed_ alive: d0709b33:bfcd6551:4d85a309:74df1cbb rt/utlidar/height_map sensor_msgs::msg::dds_::PointCloud2_ alive: 9e531810:a229c451:3315fd9c:415edc24 rt/utlidar/range_map sensor_msgs::msg::dds_::PointCloud2_ alive: 0a6d5257:787977ea:5ac0156c:1b39ba46 rt/utlidar/range_info geometry_msgs::msg::dds_::PointStamped_ alive: 83ebb9e5:6d69cbf8:4b458542:dae1be14 rt/utlidar/height_map_array unitree_go::msg::dds_::HeightMap_ alive: 1bf83b4b:562d97ef:9df5443a:84971a8a rt/utlidar/map_state unitree_go::msg::dds_::VoxelHeightMapState_ alive: a71b9ea9:984d116d:a2400d39:0839ce01 rt/utlidar/grid_map sensor_msgs::msg::dds_::PointCloud2_ alive: 3db4a0f1:1e75176b:ed20434a:fe87a63f rt/utlidar/robot_odom nav_msgs::msg::dds_::Odometry_ alive: 036f7221:ad729459:9435a047:09a9934e rt/utlidar/cloud_deskewed sensor_msgs::msg::dds_::PointCloud2_ alive: aa29f45f:8ce692b7:22cfb924:75a5bc71 rt/utlidar/mapping_cmd std_msgs::msg::dds_::String_ alive: 33264264:c316c9f9:525f6b90:cb1eb2ec rt/wirelesscontroller unitree_go::msg::dds_::WirelessController_ alive: 9613c077:46dfce42:88f8e974:9c7c8717 rt/api/sport/request unitree_api::msg::dds_::Request_ alive: d994fe76:2755380f:1d1835bb:ddba9c93 rt/api/obstacles_avoid/request unitree_api::msg::dds_::Request_ ... ``` -------------------------------- ### Action Interface and Connector Examples Python Source: https://github.com/openmind/om1/blob/main/mintlify/developing/6_actions.mdx This snippet illustrates the structure of an action plugin, including the interface definition for inputs/outputs, and example connector implementations for ROS2, Zenoh, and Unitree. ```python # Interface Definition (interface.py) class MoveInput: def __init__(self, velocity, duration): self.velocity = velocity self.duration = duration class MoveOutput: def __init__(self, success, message): self.success = success self.message = message # Implementation Passthrough (implementation/passthrough.py) class Passthrough: def execute(self, input_data): # Simple passthrough logic, returns input data return input_data # Connector Example (connector/ros2.py) class ROS2Connector: def __init__(self): # Initialize ROS2 communication pass def send_command(self, om1_input): # Maps OM1 input to ROS2 messages # Example: Publish to a ROS2 topic # ros2_node.publish('/cmd_vel', om1_input.velocity) print(f"Sending command via ROS2: {om1_input.velocity}") return MoveOutput(success=True, message='Command sent via ROS2') # Connector Example (connector/zenoh.py) class ZenohConnector: def __init__(self): # Initialize Zenoh communication pass def send_command(self, om1_input): # Maps OM1 input to Zenoh messages # Example: Put data to a Zenoh resource locator # zenoh_session.put('robot/move', str(om1_input.velocity)) print(f"Sending command via Zenoh: {om1_input.velocity}") return MoveOutput(success=True, message='Command sent via Zenoh') # Connector Example (connector/unitree.py) class UnitreeConnector: def __init__(self): # Initialize Unitree SDK connection pass def send_command(self, om1_input): # Maps OM1 input to Unitree SDK commands # Example: Use Unitree SDK to control movement # unitree_robot.move(om1_input.velocity) print(f"Sending command via Unitree SDK: {om1_input.velocity}") return MoveOutput(success=True, message='Command sent via Unitree SDK') ``` -------------------------------- ### Install Certifi and Set SSL Certificate Path Source: https://github.com/openmind/om1/blob/main/docs/developing/9_troubleshooting_guide.mdx Resolves OpenSSL certificate issues by installing the 'certifi' package and setting environment variables for SSL certificate verification. This ensures secure connections when making requests. ```shell uv pip install certifi export SSL_CERT_FILE=$(python3 -m certifi) export REQUESTS_CA_BUNDLE=$(python3 -m certifi) ``` -------------------------------- ### Start OM1 Quadruped Simulation Source: https://github.com/openmind/om1/blob/main/docs/examples/gazebo.mdx This command initiates the OM1 quadruped simulation. It requires the simulation environment to be set up and may need API key configuration in `config/quadruped_sim.json5` or `.env`. ```bash uv run src/run.py quadruped_sim ``` -------------------------------- ### Run Python Example on Linux Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/unitree_actuator_sdk/ReadMe.md Executes the Python motor control example script on Linux. Assumes the script is in the 'script' directory. ```bash cd script sudo python3 check.py ``` -------------------------------- ### Configure CycloneDDS Environment Variables (Mac Example) Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_go2_quadruped.mdx Sets the necessary environment variables for CycloneDDS, including its installation path and network interface configuration. These should be added to your shell's profile (e.g., .zshrc). ```bash export CYCLONEDDS_HOME=$HOME/Documents/GitHub/cyclonedds/install export CMAKE_PREFIX_PATH=$HOME/Documents/GitHub/cyclonedds/install export CYCLONEDDS_URI=' true ' ``` -------------------------------- ### Install ffmpeg on Ubuntu Source: https://github.com/openmind/om1/blob/main/docs/examples/gazebo.mdx This command installs the ffmpeg package on Ubuntu systems, which is necessary for streaming simulated video feeds in the Gazebo environment. ```bash sudo apt-get install ffmpeg ``` -------------------------------- ### Install Pre-commit Hooks (CLI) Source: https://github.com/openmind/om1/blob/main/mintlify/developing/0_introduction.mdx Installs pre-commit hooks to automatically run linting and formatting checks before each commit, ensuring code quality. ```bash pre-commit install ``` -------------------------------- ### Run Gazebo Simulation on macOS Source: https://github.com/openmind/om1/blob/main/docs/examples/gazebo.mdx This script installs and launches the Gazebo Harmonic simulator on macOS. It ensures Gazebo is installed and opens a simulation environment. The installation process can be lengthy. ```bash ./gazebo/macOS.sh ``` -------------------------------- ### Configure CycloneDDS Environment Variables Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/unitree_go2_quadruped.mdx These commands set the necessary environment variables for CycloneDDS, including its installation path, CMake prefix path, and a custom DDS URI for network interface configuration. These should be added to your shell's profile (e.g., .zshrc). ```bash export CYCLONEDDS_HOME=$HOME/Documents/GitHub/cyclonedds/install export CMAKE_PREFIX_PATH=$HOME/Documents/Documents/GitHub/cyclonedds/install export CYCLONEDDS_URI='\n\n \n \n \n \n \n \n \n true\n \n \n' ``` -------------------------------- ### Install Zenoh Router on Linux Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/zenoh.md Installs the Zenoh router on Debian-based Linux systems. It adds the Zenoh repository to apt sources and then installs the zenoh package. ```bash echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list > /dev/null sudo apt update sudo apt install zenoh ``` -------------------------------- ### Install CycloneDDS from Source Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_g1_humanoid.mdx Clones and builds the CycloneDDS library from source code. This process involves configuring the build with CMake, specifying an installation prefix, and then building and installing the library. It's essential for DDS communication. ```bash git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x cd cyclonedds && mkdir build install && cd build cmake -DBUILD_EXAMPLES=ON -DCMAKE_INSTALL_PREFIX=$HOME/Documents/GitHub/cyclonedds/install .. cmake --build . --target install ``` -------------------------------- ### Install Docker Compose for TurtleBot4 Bridge Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/turtlebot4_zenoh.mdx This Docker Compose configuration is used to run the Zenoh bridge for the TurtleBot4. It specifies the Docker image, container name, network mode, and restart policy. Ensure Docker is installed on the RPi before using this. ```docker-compose services: zenoh-bridge-turtlebot4: image: openmindagi/turtlebridge container_name: zenoh-bridge-turtlebot4 network_mode: "host" restart: always # Ensures the container restarts on reboot ``` -------------------------------- ### Build C/C++ on Windows with MinGW Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/unitree_actuator_sdk/ReadMe.md Builds the C/C++ examples on Windows using MinGW and CMake. Involves generating makefiles and then compiling them. ```bash cd build mingw32-make.exe ``` -------------------------------- ### Install Dependencies (Linux) Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_g1_humanoid.mdx Installs essential packages like ffmpeg and v4l-utils required for audio and video functionality on Linux systems. ```bash sudo apt-get update sudo apt-get install ffmpeg v4l-utils ``` -------------------------------- ### Run Custom or Pre-configured Agents Source: https://github.com/openmind/om1/blob/main/docs/developing/1_get-started.mdx Executes OM1 agents, including pre-configured ones like 'conversation' or custom-defined agents. The command structure allows specifying the agent name after 'uv run src/run.py'. ```bash # Run the 'conversation' agent uv run src/run.py conversation # Run a custom agent uv run src/run.py ``` -------------------------------- ### Coinbase Environment Variables Setup Source: https://github.com/openmind/om1/blob/main/docs/robotics/coinbase_hackathon.mdx Example of setting environment variables for Coinbase Wallet integration. These variables are necessary for the agent to authenticate and interact with the Coinbase API. ```bash COINBASE_WALLET_ID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" COINBASE_API_KEY="organizations/your-org-id/apiKeys/your-api-key-id" COINBASE_API_SECRET="-----BEGIN EC PRIVATE KEY-----\nyour-api-key-private-key\n-----END EC PRIVATE KEY-----\n" ``` -------------------------------- ### Install Zenoh Router on macOS Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/zenoh.md Installs the Zenoh router on macOS using Homebrew. This command adds the necessary tap and then installs the zenoh package. ```bash brew tap eclipse-zenoh/homebrew-zenoh brew install zenoh ``` -------------------------------- ### Run C/C++ Executables on Linux Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/unitree_actuator_sdk/ReadMe.md Executes the compiled C/C++ motor control examples located in the bin directory. Requires superuser privileges. ```bash cd ../bin sudo ./check_c ``` ```bash cd ../bin sudo ./check_cpp ``` -------------------------------- ### Coinbase Wallet Configuration Example Source: https://github.com/openmind/om1/blob/main/docs/robotics/coinbase_hackathon.mdx An example of a system prompt configuration for a Coinbase wallet integration. It specifies how the agent should react to receiving ETH transactions, including actions and speech. ```bash "system_prompt": " ...\nYou like receiving ETH. If you receive an ETH transaction, show your appreciation through actions and speech.\n...\n4. If there is a new ETH transaction, you might:\n\tMove: 'shake paw'\n\tSpeak: {{'sentence': 'Thank you I really appreciate the ETH you just sent.'}}\n\tFace: 'smile'\n..." ``` -------------------------------- ### CMake Project Setup and Dependencies Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_ros/unitree_controller/CMakeLists.txt Initializes the CMake version, project name, and finds necessary ROS and Gazebo packages. It declares dependencies required for the controller package. ```cmake cmake_minimum_required(VERSION 2.8.3) project(unitree_controller) find_package(catkin REQUIRED COMPONENTS controller_manager genmsg joint_state_controller robot_state_publisher roscpp gazebo_ros std_msgs tf geometry_msgs unitree_legged_msgs ) find_package(gazebo REQUIRED) catkin_package( CATKIN_DEPENDS unitree_legged_msgs ) include_directories( include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${GAZEBO_INCLUDE_DIRS} ) link_directories(${GAZEBO_LIBRARY_DIRS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GAZEBO_CXX_FLAGS}") ``` -------------------------------- ### Install hidapi on macOS Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_go2_quadruped.mdx Installs the hidapi library on macOS using Homebrew. It also includes a workaround for potential library loading issues by setting the DYLD_FALLBACK_LIBRARY_PATH environment variable. ```bash brew install hidapi export DYLD_FALLBACK_LIBRARY_PATH=$HOMEBREW_PREFIX/lib ``` -------------------------------- ### Publish and Retrieve Data via Zenoh REST API Source: https://github.com/openmind/om1/blob/main/mintlify/robotics/zenoh.md Uses curl to interact with the Zenoh REST API at port 9500. It demonstrates publishing (PUT) key-value pairs and retrieving (GET) the latest values for specified keys. ```bash # Publish values that will be stored under ${ZENOH_BACKEND_FS_ROOT}/robot curl -X PUT -d "HELLO WORLD" http://localhost:9500/robot curl -X PUT -d "HELLO WORLD A" http://localhost:9500/robot/audio # Retrieve the values curl http://localhost:9500/robot curl http://localhost:9500/robot/audio ``` -------------------------------- ### Install Zenoh Router on macOS Source: https://github.com/openmind/om1/blob/main/docs/robotics/zenoh.md Installs the Zenoh router on macOS using Homebrew. This involves tapping the official Zenoh Homebrew repository and then installing the Zenoh package. ```bash $ brew tap eclipse-zenoh/homebrew-zenoh $ brew install zenoh ``` -------------------------------- ### Install Other Files Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/move_publisher/CMakeLists.txt Installs miscellaneous files, such as launch or bag files, to the share destination directory. This is a generic installation rule for non-code assets. ```cmake install(FILES # myfile1 # myfile2 DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) ``` -------------------------------- ### Start OM1 Agent CLI Command Source: https://github.com/openmind/om1/blob/main/docs/developing/0_introduction.mdx Starts an OM1 agent with a specified configuration file. It supports optional logging levels and the ability to log output to a file. The configuration file is expected in the '/config' directory without the '.json5' extension. ```bash python src/run.py start [config_name] [--log-level] [--log-to-file] ``` -------------------------------- ### Install Zenoh Router on Linux Source: https://github.com/openmind/om1/blob/main/docs/robotics/zenoh.md Installs the Zenoh router on Debian-based Linux distributions. It adds the official Zenoh repository to apt sources and then installs the Zenoh package. ```bash $ echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list > /dev/null $ sudo apt update $ sudo apt install zenoh ``` -------------------------------- ### Build C/C++ on Linux Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/unitree_actuator_sdk/ReadMe.md Builds the C/C++ examples on Linux using CMake. Creates a build directory, configures the project with CMake, and compiles the source files. ```bash mkdir build cd build cmake .. make ``` -------------------------------- ### Install Dependencies on macOS Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_g1_humanoid.mdx Installs essential packages for robot development using Homebrew. Includes 'uv' for Python package management, 'portaudio' for audio I/O, and 'cmake' for building. ```bash brew install uv portaudio cmake ``` -------------------------------- ### Install ROS Dependencies for Melodic Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_ros/README.md Installs necessary ROS packages for Gazebo simulation and joint control on ROS Melodic. These packages facilitate interaction with Gazebo and provide controllers for robot joints. ```bash sudo apt-get install ros-melodic-controller-interface ros-melodic-gazebo-ros-control ros-melodic-joint-state-controller ros-melodic-effort-controllers ros-melodic-joint-trajectory-controller ``` -------------------------------- ### Launch OM1 on Laptop Source: https://github.com/openmind/om1/blob/main/docs/robotics/turtlebot4_zenoh.mdx Launches the OM1 system on a laptop. This configuration will use the laptop's default microphone, speaker, and camera. ```bash uv run src/run.py turtlebot4 ``` -------------------------------- ### Publish and Query Data using Zenoh REST API Source: https://github.com/openmind/om1/blob/main/docs/robotics/zenoh.md Demonstrates how to use `curl` to interact with the Zenoh REST API at port 9500. It shows how to publish (PUT) new key-value pairs and retrieve (GET) the latest values for specified keys. The data is stored persistently in the location defined by `ZENOH_BACKEND_FS_ROOT`. ```bash # Put values that will be stored under ${ZENOH_BACKEND_FS_ROOT}/robot curl -X PUT -d "HELLO WORLD" http://localhost:9500/robot curl -X PUT -d "HELLO WORLD A" http://localhost:9500/robot/audio # Retrieve the values curl http://localhost:9500/robot curl http://localhost:9500/robot/audio ``` -------------------------------- ### Start OM1-avatar Docker Service Source: https://github.com/openmind/om1/blob/main/docs/full_autonomy_guidelines/architecture_overview.mdx Starts the OM1-avatar frontend service using Docker Compose in detached mode. ```bash cd OM1-avatar docker-compose up om1_aatar -d --no-build ``` -------------------------------- ### Run Junior Controller Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/unitree_guide/README.md Executes the junior controller for the unitree_guide project. This program controls the robot's movements and state machine within the simulator. ```bash ./devel/lib/unitree_guide/junior_ctrl ``` -------------------------------- ### Build and Run CycloneDDS Topic Lister Source: https://github.com/openmind/om1/blob/main/docs/robotics/unitree_g1_humanoid.mdx Builds and executes the CycloneDDS 'listtopics' example. This utility helps in discovering and displaying all active topics within the DDS domain, which is vital for monitoring robot communication. ```bash cd $HOME/Documents/GitHub/cyclonedds/install/share/CycloneDDS/examples/listtopics cmake . cmake --build . ``` -------------------------------- ### Start Unitree ROS2 SDK Docker Services Source: https://github.com/openmind/om1/blob/main/docs/full_autonomy_guidelines/architecture_overview.mdx Starts the orchestrator, sensor, and watchdog services for the Unitree Go2 robot using Docker Compose in detached mode. ```bash cd unitree_go2_ros2_sdk docker-compose up orchestrator -d --no-build docker-compose up om1_sensor -d --no-build docker-compose up watchdog -d --no-build ``` -------------------------------- ### Install Library Target Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/move_publisher/CMakeLists.txt Marks a library target for installation. This defines the destinations for archive, library, and runtime components of the library. ```cmake install(TARGETS ${PROJECT_NAME} ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} RUNTIME DESTINATION ${CATKIN_GLOBAL_BIN_DESTINATION} ) ``` -------------------------------- ### Install and Run Pre-commit Hooks Source: https://github.com/openmind/om1/blob/main/docs/developing/0_introduction.mdx Installs pre-commit hooks to automatically run code checks (linting, formatting) before each commit. It also shows how to manually trigger all pre-commit checks on all files in the repository. ```bash pre-commit install pre-commit run --all-files ``` -------------------------------- ### Start OM1 Docker Services Source: https://github.com/openmind/om1/blob/main/docs/full_autonomy_guidelines/architecture_overview.mdx Starts the OM1 agent service using Docker Compose in detached mode. ```bash cd OM1 docker-compose up om1 -d --no-build ``` -------------------------------- ### Install Executable Target Source: https://github.com/openmind/om1/blob/main/gazebo/docker/gazebo_ros/docker/guide_ws/src/move_publisher/CMakeLists.txt Marks an executable target for installation. This specifies where the executable should be placed in the runtime destination directory. ```cmake install(TARGETS ${PROJECT_NAME}_node RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} ) ``` -------------------------------- ### Unitree SDK C++ Example for Humanoid HAL Source: https://github.com/openmind/om1/blob/main/README.md A C++ code snippet from Unitree's SDK, illustrating an advanced humanoid HAL example. It shows interaction with high-level commands for robot control. ```cpp //example/g1/high_level/g1_loco_client_example.cpp ... if (cmd_type == HIGH_CMD_LOGIN) { // ... } else if (cmd_type == HIGH_CMD_BACKFLIP) { // ... } ... ``` -------------------------------- ### List Expected ROS2 Topics Source: https://github.com/openmind/om1/blob/main/docs/robotics/turtlebot4_zenoh.mdx Lists the ROS2 topics expected on a TurtleBot4, categorized by their origin (Raspberry Pi or Create3). This is useful for verifying system configuration and communication. ```bash ros2 topic list ``` -------------------------------- ### Start SLAM via REST API Source: https://github.com/openmind/om1/blob/main/docs/full_autonomy_guidelines/ros2_sdk.mdx Sends a POST request to the orchestrator service to start the SLAM process. The body is an empty JSON object. ```bash curl --location 'http://localhost:5000/start/slam' \ --header 'Content-Type: application/json' \ --data '{}' ```