{"id":598,"date":"2026-05-04T05:31:42","date_gmt":"2026-05-04T05:31:42","guid":{"rendered":"https:\/\/giatec.io\/aizuhand\/?page_id=598"},"modified":"2026-06-02T06:35:46","modified_gmt":"2026-06-02T06:35:46","slug":"nexus-initialization","status":"publish","type":"page","link":"https:\/\/giatec.io\/aizuhand\/index.php\/nexus-initialization\/","title":{"rendered":"Initialization\/Setup phase"},"content":{"rendered":"<p><!DOCTYPE html><br \/>\n<html lang=\"en\"><br \/>\n<head><br \/>\n    <meta charset=\"UTF-8\"><br \/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><br \/>\n    <title>Module 0: SDK Philosophy &#038; Initialization | NHURO Nexus<\/title><\/p>\n<style>\n        :root {\n            --primary: #2c3e50;\n            --secondary: #9b59b6; \n            --info: #34495e;\n            --code-bg: #1e1e1e;\n            --warning: #e67e22;\n            --sdk-blue: #2980b9;\n            --folder-green: #27ae60;\n            --terminal-gray: #f8f9fa;\n        }\n        body { font-family: 'Segoe UI', sans-serif; line-height: 1.6; color: #333; background: #fdfdfd; margin: 0; padding: 0; }\n        .header { background: #2c3e50; color: white; padding: 40px 20px; text-align: center; border-bottom: 5px solid var(--secondary); }\n        .container { max-width: 900px; margin: 20px auto; padding: 20px; background: white; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }\n        .philosophy-box { background: #ebf5fb; border-left: 5px solid var(--sdk-blue); padding: 15px; margin: 20px 0; }\n        .unix-lesson { background: #f4ecf7; border-left: 5px solid var(--secondary); padding: 15px; margin: 20px 0; }\n        .auth-warning { background: #fff3cd; border-left: 5px solid var(--warning); padding: 15px; margin: 20px 0; border-radius: 4px; color: #856404; }\n        h2 { color: var(--secondary); border-bottom: 2px solid #eee; padding-bottom: 10px; margin-top: 30px; }\n        h3 { color: var(--primary); margin-top: 25px; }\n        .terminal { background: #000; color: #00ff00; padding: 15px; border-radius: 5px; font-family: 'Courier New', monospace; margin-bottom: 10px; word-break: break-all; font-size: 0.9em; }\n        .file-tree { background: #f8f9fa; border: 1px solid #ddd; padding: 15px; font-family: 'Courier New', monospace; font-size: 0.85em; color: #333; line-height: 1.4; }\n        .highlight-edit { color: #e74c3c; font-weight: bold; }\n        .dim-ignore { color: #999; }\n        .method-tab { border-top: 2px dashed #ccc; padding-top: 20px; margin-top: 20px; }\n        .pre-build-map { border: 2px solid var(--folder-green); border-radius: 6px; padding: 15px; background: #f0fff4; margin: 15px 0; }\n        .analogy-list { list-style: none; padding-left: 0; }\n        .analogy-list li { margin-bottom: 10px; padding-left: 20px; border-left: 3px solid var(--sdk-blue); }\n        .nav-link { display: inline-block; margin-top: 20px; color: var(--sdk-blue); text-decoration: none; font-weight: bold; }\n        .nav-link:hover { text-decoration: underline; }<\/p>\n<p>        .philosophy-table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.9em; }\n        .philosophy-table th { background: var(--primary); color: white; padding: 10px; text-align: left; }\n        .philosophy-table td { border: 1px solid #ddd; padding: 10px; vertical-align: top; }\n        .philosophy-table tr:nth-child(even) { background-color: #f2f2f2; }\n        .step-list { margin: 15px 0; padding-left: 20px; }\n        .step-list li { margin-bottom: 15px; }\n        .step-title { font-weight: bold; color: var(--primary); }\n    <\/style>\n<p><\/head><br \/>\n<body><\/p>\n<div class=\"header\">\n<h1>Module 0: The NHURO SDK &#038; System Setup<\/h1>\n<p>Understanding the &#8220;Why&#8221; before the &#8220;How&#8221;<\/p>\n<\/div>\n<div class=\"container\">\n<div class=\"philosophy-box\">\n<h2>1. What is the NHURO SDK? (The Robot Brain Kit)<\/h2>\n<p>Think of the <strong>NHURO SDK<\/strong> as a &#8220;Starter Kit&#8221; for building a digital brain. Just like a smartphone has an SDK for building apps, our robot has an SDK for building <strong>human-like, autonomous behaviors<\/strong>.<\/p>\n<ul class=\"analogy-list\">\n<li><strong>SDK (Software Development Kit):<\/strong> This is your toolbox. It contains pre-written code structures, ROS 2 nodes, and hardware wrappers needed to control the robot&#8217;s physical body without engineering low-level servo communication strings from scratch.<\/li>\n<li><strong>Neuromorphic &#038; Humanoid:<\/strong> &#8220;Humanoid&#8221; means the physical robot mimics a human shape. &#8220;Neuromorphic&#8221; means the computing system works like a biological brain\u2014processing sensory events (like live voice streams) and acting on those events instantly.<\/li>\n<\/ul>\n<h3>Why do we use ROS 2? (The Social Network for Parts)<\/h3>\n<p>Imagine the robot&#8217;s hardware components as different people working in a laboratory room. <strong>ROS 2 (Robot Operating System 2)<\/strong> acts as their high-speed communication network or walkie-talkie channel:<\/p>\n<ol>\n<li><strong>The Sensory Ear Bridge<\/strong> captures an audio chunk and broadcasts it.<\/li>\n<li><strong>The Brain Node<\/strong> intercepts that audio stream and decodes the spoken word (&#8220;wave&#8221;).<\/li>\n<li><strong>The Muscle Node<\/strong> catches the processed request and tells the physical arm to swing.<\/li>\n<\/ol>\n<p>By using ROS 2, the robot becomes completely <strong>Modular<\/strong>\u2014you can change or upgrade your sensory capture drivers without changing how your physical muscles move.<\/p>\n<\/p><\/div>\n<h2>2. Navigating the Workspace (The Clean Golden Source Layout)<\/h2>\n<p>When you download the repository, it includes a clean repository root layout. To ensure local changes don&#8217;t cause clutter, strict <code>.gitignore<\/code> rules automatically block temporary logs, compilation cache folders, and large raw audio files from tracking.<\/p>\n<p>Understanding your workspace folders is easy when you remember this rule:<\/p>\n<ul>\n<li><strong>The Workshop (src\/):<\/strong> This is where you sit and write code. You only care about modifying files inside this directory.<\/li>\n<li><strong>The Factory (build\/, install\/, &#038; log\/):<\/strong> These are generated automatically by ROS 2 compilation tools. <strong>Never manually edit files here<\/strong>; your edits will be instantly overwritten the next time the workspace builds.<\/li>\n<\/ul>\n<div class=\"file-tree\">\n        nhuro_project\/ &larr; Repository Root Directory<br \/>\n        \u251c\u2500\u2500 <span class=\"highlight-edit\">.gitignore<\/span> &larr; Explicit rules file hiding build clutter and raw logs from Git<br \/>\n        \u251c\u2500\u2500 <span class=\"highlight-edit\">nhuro_prod_on<\/span> &larr; Universal script to set up environment paths automatically<br \/>\n        \u251c\u2500\u2500 <span class=\"highlight-edit\">voice_bridge.py<\/span> &larr; Local microphone audio streamer wrapper<br \/>\n        \u2514\u2500\u2500 nhuro_ws\/ &larr; ROS 2 Workspace Directory<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500 <span class=\"dim-ignore\">build\/ &#038; install\/ &#038; log\/ &larr; IGNORE (Auto-generated by colcon)<\/span><br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;\u2514\u2500\u2500 <strong>src\/ &larr; THE WORKSHOP (Your code lives here)<\/strong><br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u251c\u2500\u2500 nhuro_interfaces\/ &larr; Custom Interface Specification Package<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u2502&nbsp;&nbsp;\u251c\u2500\u2500 action\/ <span class=\"highlight-edit\">Wave.action, Walk.action<\/span> &larr; Target Action Goal Definitions<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u2502&nbsp;&nbsp;\u251c\u2500\u2500 CMakeLists.txt<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u2502&nbsp;&nbsp;\u2514\u2500\u2500 package.xml<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\u2514\u2500\u2500 nhuro_driver\/ &larr; Main Control Processing Package<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            \u251c\u2500\u2500 setup.py<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            \u251c\u2500\u2500 package.xml<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;            \u2514\u2500\u2500 nhuro_driver\/<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                \u251c\u2500\u2500 <span class=\"highlight-edit\">nhuro_unified_voice.py<\/span> &larr; UNIFIED ENGINE (Asynchronous Brain &#038; Muscle Hub)<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                \u251c\u2500\u2500 voice_live_node.py<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                \u251c\u2500\u2500 voice_parser_node.py<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                \u251c\u2500\u2500 nhuro_action_node.py<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                \u2514\u2500\u2500 <strong>nhuro\/ (Low-Level Hardware Core Drivers)<\/strong><br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                    \u251c\u2500\u2500 <span class=\"highlight-edit\">robot.py<\/span> &larr; Multi-joint movement sequencer<br \/>\n        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;                    \u2514\u2500\u2500 <span class=\"highlight-edit\">bus_servo.py<\/span> &larr; TTL serial communication controller\n    <\/div>\n<h2>3. The Single-Terminal Pipeline Architecture<\/h2>\n<p>While experimental testing allows isolating sensors, brains, and muscles across three separate terminals, production deployments utilize an <strong>asynchronous single-terminal infrastructure<\/strong> managed by <code>nhuro_unified_voice.py<\/code>. This approach provides robust multithreaded processing, prevents system dependency conflicts, and enables self-healing hardware channel discovery.<\/p>\n<table class=\"philosophy-table\">\n<tr>\n<th>Module Component<\/th>\n<th>Thread \/ Processing Layer<\/th>\n<th>Execution Logic &#038; Safety Shielding<\/th>\n<\/tr>\n<tr>\n<td><strong>Sensory Audio Grabber<\/strong><\/td>\n<td>Main Execution Thread<\/td>\n<td>Bypasses default routing and scans low-level sound architectures directly to locate and bind the physical string <code>\"USB Microphone\"<\/code>. This circumvents application crashes if a temporary driver dropout occurs.<\/td>\n<\/tr>\n<tr>\n<td><strong>Brain NLP Engine<\/strong><\/td>\n<td>ROS 2 Executor Worker 1<\/td>\n<td>Intercepts incoming text data streams asynchronously via standard messaging topics. Translates raw strings into actionable structural meanings without blocking microphone capture tasks.<\/td>\n<\/tr>\n<tr>\n<td><strong>Muscle Action Server<\/strong><\/td>\n<td>ROS 2 Executor Worker 2<\/td>\n<td>Spun up inside an independent background worker loop. Manages serial timing to the physical servos. If an electrical surge or joint obstruction trips a servo, the muscle thread isolates the crash safely, keeping the audio listening loops up and alive for remote debugging.<\/td>\n<\/tr>\n<\/table>\n<div class=\"unix-lesson\">\n        <strong>Core Hardware Management Tip:<\/strong><br \/>\n        High-torque humanoid servo motors draw heavy current spikes when decelerating or locking positions. If the servos and the Raspberry Pi share common power traces, these spikes can trigger a brief voltage brownout, dropping your SSH connection or restarting the Pi. To guarantee uninterrupted runtimes during laboratory testing, always route power through an isolated dual-rail distribution circuit!\n    <\/div>\n<h2>4. Getting the Code<\/h2>\n<div class=\"auth-warning\">\n        <strong>\u26a0\ufe0f CRITICAL SECURITY WARNING: GitHub Access Tokens Required<\/strong><br \/>\n        Standard GitHub account passwords <strong>cannot be used<\/strong> for command-line authentication operations. Trying to clone with your password will result in an immediate <code>Invalid username or token<\/code> error.<\/p>\n<p>        <strong>The Solution:<\/strong> You must log into your GitHub account via a web browser, go to <i>Settings &rarr; Developer Settings &rarr; Personal Access Tokens (Classic)<\/i>, and generate a token with the <strong><code>repo<\/code><\/strong> checkbox selected. Use this generated token string as your terminal authentication key.\n    <\/div>\n<div class=\"method-tab\">\n<h3>Method A: Online (Direct Lab GitHub Clone)<\/h3>\n<p>Use this method if your Raspberry Pi terminal is connected to the internet. Replace <code>YOUR_PERSONAL_ACCESS_TOKEN<\/code> with your copied token string.<\/p>\n<div class=\"terminal\">\n            cd ~<br \/>\n            git clone https:\/\/YOUR_PERSONAL_ACCESS_TOKEN@github.com\/acsl-aizu\/nhuro_project.git\n        <\/div>\n<\/p><\/div>\n<div class=\"method-tab\">\n<h3>Method B: Offline (Laboratory USB Deployment)<\/h3>\n<p>Use this method if working inside the isolated laboratory room with a pre-loaded USB flash drive.<\/p>\n<div class=\"terminal\">\n            cp -r \/media\/pi\/USB_NAME\/nhuro_project ~\/nhuro_project\n        <\/div>\n<\/p><\/div>\n<h2>5. Initializing, Building, and Running<\/h2>\n<p>To simplify compilation and environment configuration for students, the repository includes a universal activation script named <code>nhuro_prod_on<\/code>. This script automatically maps path layouts using universal variables, resolves package search rules, and loads the isolated compiler environment.<\/p>\n<p>Follow these step-by-step commands in your terminal to initialize and execute the system pipeline:<\/p>\n<ul class=\"step-list\">\n<li>\n            <span class=\"step-title\">Step 1: Enter the Project Folder<\/span><br \/>\n            Navigate directly into your root repository project folder where the environmental scripts reside:<\/p>\n<div class=\"terminal\">cd ~\/nhuro_project<\/div>\n<\/li>\n<li>\n            <span class=\"step-title\">Step 2: Initialize Paths and Environment<\/span><br \/>\n            Run the production onboarding utility script to automatically configure paths and load the isolated ROS 2 micromamba shell environment parameters:<\/p>\n<div class=\"terminal\">source .\/nhuro_prod_on<\/div>\n<\/li>\n<li>\n            <span class=\"step-title\">Step 3: Compile the Workspace<\/span><br \/>\n            Move inside the ROS 2 workspace subdirectory and launch the colcon build engine with symlink mappings to compile your custom node modules:<\/p>\n<div class=\"terminal\">cd nhuro_ws<br \/>colcon build &#8211;symlink-install<\/div>\n<\/li>\n<li>\n            <span class=\"step-title\">Step 4: Source Binaries and Execute the Unified System<\/span><br \/>\n            Source your newly compiled installation environment setup file, and execute the core multithreaded unified voice control processing loop:<\/p>\n<div class=\"terminal\">source install\/setup.zsh<br \/>python3 -m nhuro_driver.nhuro_unified_voice<\/div>\n<\/li>\n<\/ul>\n<p>Once started, the system will silence driver log spam, scan your USB bus, establish a live microphone stream, and stand by to parse spoken statements. Say the word <b>&#8220;wave&#8221;<\/b> into the microphone, and the muscle server will intercept your intent and trigger the physical arm movement sequences!<\/p>\n<p>    <a href=\"https:\/\/giatec.io\/aizuhand\/index.php\/nhuro-nexus\/\" class=\"nav-link\">&larr; Back to NHURO Nexus Portal<\/a>\n<\/div>\n<div style=\"text-align: center; padding: 20px; color: #888; font-size: 0.8em;\">\n    &copy; 2026 Prof. Abderazek Ben Abdallah | Lab of Computer Systems (ACSL) | University of Aizu\n<\/div>\n<p><\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Module 0: SDK Philosophy &#038; Initialization | NHURO Nexus Module 0: The NHURO SDK &#038; System Setup Understanding the &#8220;Why&#8221; before the &#8220;How&#8221; 1. What is the NHURO SDK? (The Robot Brain Kit) Think of the NHURO SDK as a &#8220;Starter Kit&#8221; for building a digital brain. Just like a smartphone has an SDK for [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"saved_in_kubio":false,"footnotes":""},"class_list":["post-598","page","type-page","status-publish","hentry"],"kubio_ai_page_context":{"short_desc":"","purpose":"general"},"_links":{"self":[{"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/pages\/598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/comments?post=598"}],"version-history":[{"count":20,"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/pages\/598\/revisions"}],"predecessor-version":[{"id":713,"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/pages\/598\/revisions\/713"}],"wp:attachment":[{"href":"https:\/\/giatec.io\/aizuhand\/index.php\/wp-json\/wp\/v2\/media?parent=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}