Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HWT906 not showing any data #45

Closed
musstt opened this issue Nov 6, 2024 · 15 comments
Closed

HWT906 not showing any data #45

musstt opened this issue Nov 6, 2024 · 15 comments
Labels
question Further information is requested

Comments

@musstt
Copy link

musstt commented Nov 6, 2024

this is my config.yaml file

witmotion_imu:
    port: ttyUSB0
    baud_rate: 115200 # baud
    polling_interval: 50 # ms
    timeout_ms: 150 # ms
    restart_service_name: /restart_imu
    imu_publisher:
        topic_name: /imu
        frame_id: imu
        use_native_orientation: false
        measurements:
            acceleration:
                enabled: true
                covariance: [ 0.0088,    0,       0,
                              0,         0.0550,  0,
                              0,         0,       0.0267 ]
            angular_velocity:
                enabled: true
                covariance: [ 0.1199,    0,       0,
                              0,         0.5753,  0,
                              0,         0,       0.0267 ]
            orientation:
                enabled: true
                covariance: [ 0.0190,    0,       0,
                              0,         0.0120,  0,
                              0,         0,       0.0107 ]
    temperature_publisher:
        enabled: false
        topic_name: /temperature
        frame_id: base_link
        from_message: magnetometer # acceleration, angular_vel, orientation, magnetometer
        variance: 0.02683
        coefficient: 1.0 # Linear calibration parameters: coefficient
        addition: 0.0 # and addendum
    magnetometer_publisher:
        enabled: true
        topic_name: /magnetometer
        frame_id: imu
        coefficient: 0.00000001 # Linear calibration parameters: coefficient
        addition: 0.0 # and addendum
        covariance: [ 0.000000187123,   0,              0,
                      0,                0.000000105373, 0,
                      0,                0,              0.000000165816  ]
    barometer_publisher:
        enabled: true
        topic_name: /barometer
        frame_id: base_link
        variance: 0.001
        coefficient: 1.0 # Linear calibration parameters: coefficient
        addition: 0.0 # and addendum
    altimeter_publisher:
        enabled: true
        topic_name: /altitude
        coefficient: 1.0 # Linear calibration parameters: coefficient
        addition: 0.0 # and addendum
    orientation_publisher:
        enabled: true
        topic_name: /orientation
    gps_publisher:
        enabled: false
        navsat_fix_frame_id: world
        navsat_fix_topic_name: /gps
        navsat_altitude_topic_name: /gps_altitude
        navsat_satellites_topic_name: /gps_satellites
        navsat_variance_topic_name: /gps_variance
        ground_speed_topic_name: /gps_ground_speed
    rtc_publisher:
        enabled: true
        topic_name: /witmotion_clock
        presync: true

i dont know what parameter need to be set true and false

@musstt
Copy link
Author

musstt commented Nov 6, 2024

Press Ctrl+C to stop enumeration and see the report
Opening device "ttyUSB0" at 19200 baud
Instantiating timer at 50 ms
^C
Closing TTL connection

WITMOTION UART MESSAGE ENUMERATOR BY TWDRAGON

Acquired at Rabu, 06 November 2024 22.19.29 WIB

ID Qty Description

0x51 2 Accelerations
0x54 1 Magnetometer/Magnetic orientation
0x55 9 Data ports (D0-D3) status

Unknown IDs: 0 [  ] 

Total messages: 12

i try message enumator

@twdragon
Copy link
Collaborator

twdragon commented Nov 6, 2024

@musstt you should disable anything except Accelerations in the IMU ROS message builder, otherwise it will never consider the data structure complete, so:

    imu_publisher:
        topic_name: /imu
        frame_id: imu
        use_native_orientation: false
        measurements:
            acceleration:
                enabled: true
                covariance: [ 0.0088,    0,       0,
                              0,         0.0550,  0,
                              0,         0,       0.0267 ]
            angular_velocity:
-                 enabled: true
+                enabled: false
                covariance: [ 0.1199,    0,       0,
                              0,         0.5753,  0,
                              0,         0,       0.0267 ]
            orientation:
-                 enabled: true
+                enabled: false
                covariance: [ 0.0190,    0,       0,
                              0,         0.0120,  0,
                              0,         0,       0.0107 ]

@twdragon
Copy link
Collaborator

twdragon commented Nov 6, 2024

@musstt if you will have success, please do not hesitate to create the test report here: #16

@musstt
Copy link
Author

musstt commented Nov 6, 2024

what about the baud rate and polling interval parameters?

@musstt
Copy link
Author

musstt commented Nov 6, 2024

and another publisher? should i change the enable parameters to false?

@musstt
Copy link
Author

musstt commented Nov 6, 2024

musthofa@musthofa-ubuntu:~$ rosrun witmotion_ros message-enumerator -d ttyUSB0 -b 19200 -p 50
Press Ctrl+C to stop enumeration and see the report
Opening device "ttyUSB0" at 19200 baud
Instantiating timer at 50 ms
^C
Closing TTL connection

WITMOTION UART MESSAGE ENUMERATOR BY TWDRAGON

Acquired at Rabu, 06 November 2024 22.30.38 WIB

ID Qty Description

0x51 2 Accelerations
0x54 1 Magnetometer/Magnetic orientation
0x55 2 Data ports (D0-D3) status
0x57 1 GPS Coordinates
0x59 1 Spatial orientation (Quaternion)

Unknown IDs: 0 [  ] 

Total messages: 7

musthofa@musthofa-ubuntu:~$ rosrun witmotion_ros message-enumerator -d ttyUSB0 -b 19200 -p 50
Press Ctrl+C to stop enumeration and see the report
Opening device "ttyUSB0" at 19200 baud
Instantiating timer at 50 ms
^C
Closing TTL connection

WITMOTION UART MESSAGE ENUMERATOR BY TWDRAGON

Acquired at Rabu, 06 November 2024 22.32.15 WIB

ID Qty Description

0x51 2 Accelerations
0x55 1 Data ports (D0-D3) status

Unknown IDs: 0 [  ] 

Total messages: 3

i try another message enumator, but it seems like not consistent

@twdragon
Copy link
Collaborator

twdragon commented Nov 6, 2024

@musstt these parameters should be set up according to the actual settings of your device. Now I see only IMU and Magnetometer publishers should be enabled.

Update For now it seems 19200 baud is sufficient, but you should use one of the example controller applications or the official Witmotion application to set the parameters directly on the device

@twdragon twdragon added the question Further information is requested label Nov 6, 2024
@musstt
Copy link
Author

musstt commented Nov 6, 2024

image
what do you think?

@musstt
Copy link
Author

musstt commented Nov 6, 2024

image

@twdragon
Copy link
Collaborator

twdragon commented Nov 6, 2024

@musstt I recommend you reduce the baudrate to 115200, adjust the polling rate to 10 ms, and output rate to 100 Hz, and then set up the bandwidth accordingly. 1 KHz, as I see, will be less accurate (due to the Kalman filter) and redundant for most applications.

@twdragon
Copy link
Collaborator

twdragon commented Nov 6, 2024

@musstt sorry but I need to close this issue here, as your device is working and there are no bugs reported. Please, if you need still to reach me, do not hesitate to open a discussion on ROS Discourse mentioning me as @twdragon and inserting a link to this issue (#45)

@twdragon twdragon closed this as completed Nov 6, 2024
@musstt
Copy link
Author

musstt commented Nov 6, 2024

Wait, could you tell me what parameters enable should be true or false, i cant figure it out although i see from the windows application, sorry

@twdragon
Copy link
Collaborator

twdragon commented Nov 6, 2024

@musstt you should set up enabled to all measurements in the IMU, and Magnetometer, it is enough for your setup. But please adjust in the official app the baudrate, and then set it up in your config accordingly.

@twdragon
Copy link
Collaborator

twdragon commented Nov 6, 2024

@musstt once you see them in the Content section of the official app, then you should enable them in the config

@musstt
Copy link
Author

musstt commented Nov 6, 2024

Thank you so much!!!!! It works!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants