unitreerobotics / unitree_sdk2_python

Python interface for unitree sdk2
BSD 3-Clause "New" or "Revised" License
80 stars 33 forks source link

Is this sdk also tested on h1-2? #20

Open Dawnborn opened 1 day ago

Dawnborn commented 1 day ago

Dear developers,

thank you for your contribution!

Are this repo and examples only for H1 or they could also work on H1-2. Recently I pull this repo and try to run on our H1-2 robot.

python h1_low_level_example.py                                                       
WARNING: Please ensure there are no obstacles around the robot while running this example.
Press Enter to continue...
[RecurrentThread] target func raise exception: name=AttributeError, args=("'NoneType' object has no attribute 'imu_state'",)
[RecurrentThread] target func raise exception: name=AttributeError, args=("'NoneType' object has no attribute 'motor_state'",)
[RecurrentThread] target func raise exception: name=AttributeError, args=("'NoneType' object has no attribute 'motor_state'",)
[RecurrentThread] target func raise exception: name=AttributeError, args=("'NoneType' object has no attribute 'motor_state'",)

There is no error during the installation. The robot is in develop mode, and I have run the following cmd

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

and export this file as the CYCLONEDDS_URI

<?xml version="1.0" encoding="UTF-8" ?>
<CycloneDDS xmlns="https://cdds.io/config" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="https://cdds.io/config https://raw.githubusercontent.com/eclipse-cyclonedds/cyclonedds/master/etc/cyclonedds.xsd">
    <Domain Id="any">
        <General>
            <Interfaces>
                <NetworkInterface name="enp6s0" priority="default" multicast="default" />
            </Interfaces>
            <AllowMulticast>spdp</AllowMulticast>
        </General>
        <Internal>
            <!--MinimumSocketReceiveBufferSize>50MB</MinimumSocketReceiveBufferSize-->
        </Internal>
    </Domain>
</CycloneDDS>