S SmartDocs
Serie: Robotaxi-OperatingSystem-Hardware-Interfaces python 43 righe · Aggiornato 2026-03-12

test_connection.py

Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboSkill/fourier/gr2/test_connection.py

import time
import sys
from fourier_aurora_client import AuroraClient

DOMAIN_ID = 123
ROBOT_NAME = "gr2"

def test_connection():
    print(f"🔄 Attempting to connect to robot '{ROBOT_NAME}' on domain {DOMAIN_ID}...")

    try:
        client = AuroraClient.get_instance(domain_id=DOMAIN_ID, robot_name=ROBOT_NAME)
        print("✅ Client instance created.")
    except Exception as e:
        print(f"❌ Failed to create client: {e}")
        return

    print("⏳ Waiting 3 seconds for discovery...")
    time.sleep(3)

    try:
        # Try to read state
        pos = client.get_group_state("right_manipulator")
        print(f"📊 Current Right Arm Position: {pos}")

        if pos is None:
            print("⚠️  Position is None. Robot might not be publishing state.")
            print("   Possible causes:")
            print("   1. Network interface mismatch (DDS is using the wrong WiFi/Ethernet adapter)")
            print("   2. Robot is powered off")
            print("   3. Firewall blocking UDP multicast")
        else:
            # Check if values are all zeros (common issue with uninitialized DDS)
            if all(v == 0.0 for v in pos):
                print("⚠️  Position is all zeros. This often indicates no actual data received.")
            else:
                print("✅ Valid data received! Connection is working.")

    except Exception as e:
        print(f"❌ Error reading state: {e}")

if __name__ == "__main__":
    test_connection()

Articoli correlati

Robotaxi-OperatingSystem-Hardware-Interfaces c Aggiornato 2026-02-03

alloc.c

alloc.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/alloc.c).

Leggi l'articolo →
Robotaxi-OperatingSystem-Hardware-Interfaces c Aggiornato 2026-02-03

hello.c

hello.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/hello.c).

Leggi l'articolo →
Robotaxi-OperatingSystem-Hardware-Interfaces c Aggiornato 2026-02-03

mlock_demo.c

mlock_demo.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/mlock_demo.c).

Leggi l'articolo →
Robotaxi-OperatingSystem-Hardware-Interfaces python Aggiornato 2026-03-12

debug_perf.py

debug_perf.py — python source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/debug_perf.py).

Leggi l'articolo →
Robotaxi-OperatingSystem-Hardware-Interfaces python Aggiornato 2026-03-12

inference.py

inference.py — python source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/inference.py).

Leggi l'articolo →
Robotaxi-OperatingSystem-Hardware-Interfaces bash Aggiornato 2026-03-12

startup.sh

startup.sh — bash source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/startup.sh).

Leggi l'articolo →