Skip to content

Problems with high baudrates #14

@hbadino

Description

@hbadino

Hi,

first of all, thanks for making this driver open source. I'm pretty sure the robotics community appreciates it.

I have a question regarding the baudrate. I'm able to run my 3DM-GX4-25 without any problems at baudrates 115200 and 230400. Setting the baudrate to 460800 is not always possible and I have to retry several times until it works. The max baudrate of 921600 always fails. The very first time I try with the max baudrate I get this error:

... logging to /home/hbadino/.ros/log/cda72c8c-3f8d-11e5-a219-14dda925ae96/roslaunch-PowerMotion-11802.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://PowerMotion:56630/

SUMMARY

PARAMETERS

  • /imu/baudrate: 921600
  • /imu/device: /dev/ttyUSB0
  • /imu/enable_accel_update: False
  • /imu/enable_filter: False
  • /imu/enable_mag_update: False
  • /imu/filter_rate: 100
  • /imu/frame_id: imu
  • /imu/imu_rate: 420
  • /imu/verbose: True
  • /rosdistro: indigo
  • /rosversion: 1.11.13

NODES
/
imu (imu_3dm_gx4/imu_3dm_gx4)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[imu-1]: started with pid [11820]
[ INFO] [1439232889.437564255]: Selecting baud rate 921600
Switching to baud rate 9600
Switched baud rate to 9600
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 19200
Switched baud rate to 19200
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 115200
Switched baud rate to 115200
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 230400
Switched baud rate to 230400
Sending a ping packet.
Handling read : 75
Handling read : 65
Handling read : 1
Handling read : 4
Handling read : 4
Handling read : f1
Handling read : 1 0
Handling read : d5
Handling read : 6a
Found correct baudrate.
Instructing device to change to 921600
Sending command:
SyncMSB: 75
SyncLSB: 65
Descriptor: c
Length: 7
Payload: 7 40 1 0 e 10 0
Check MSB: 53
Check LSB: 9d
Handling read : 75 65 c
Handling read : 4
Handling read : 4
Handling read : f1
Handling read : 40
Handling read : 0
Handling read : 1f
Handling read : 2a
Sending command:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
[ERROR] [1439232901.947359999]: Exception: Device did not respond to ping.
Timed-out while reading. Time-out limit is 300ms.

Sending command:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 2
Check MSB: e1
Check LSB: c7
[imu-1] process has finished cleanly
log file: /home/hbadino/.ros/log/cda72c8c-3f8d-11e5-a219-14dda925ae96/imu-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

After that first try, I get a different error message which reads:

... logging to /home/hbadino/.ros/log/cda72c8c-3f8d-11e5-a219-14dda925ae96/roslaunch-PowerMotion-12064.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://PowerMotion:45413/

SUMMARY

PARAMETERS

  • /imu/baudrate: 921600
  • /imu/device: /dev/ttyUSB0
  • /imu/enable_accel_update: False
  • /imu/enable_filter: False
  • /imu/enable_mag_update: False
  • /imu/filter_rate: 100
  • /imu/frame_id: imu
  • /imu/imu_rate: 420
  • /imu/verbose: True
  • /rosdistro: indigo
  • /rosversion: 1.11.13

NODES
/
imu (imu_3dm_gx4/imu_3dm_gx4)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[imu-1]: started with pid [12082]
[ INFO] [1439233295.508459550]: Selecting baud rate 921600
Switching to baud rate 9600
Switched baud rate to 9600
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 19200
Switched baud rate to 19200
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 115200
Switched baud rate to 115200
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 230400
Switched baud rate to 230400
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 460800
Switched baud rate to 460800
Sending a ping packet.
Timed out reading response to:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 1
Check MSB: e0
Check LSB: c6
Timed out waiting for ping response.
Switching to baud rate 921600
Switched baud rate to 921600
Sending a ping packet.
Handling read : 75 65 1 4 4 f1 1 2
Handling read : d7 6c
Received NACK packet (class, command, code): 1, 1, 2
IMU returned error code for ping.
[ERROR] [1439233299.215503549]: Exception: Failed to reach device /dev/ttyUSB0

Sending command:
SyncMSB: 75
SyncLSB: 65
Descriptor: 1
Length: 2
Payload: 2 2
Check MSB: e1
Check LSB: c7
[imu-1] process has finished cleanly
log file: /home/hbadino/.ros/log/cda72c8c-3f8d-11e5-a219-14dda925ae96/imu-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

The second time apparently does not time out, but it is unable to open the device.

After this, it is not possible to restart the device at any other baudrate and the only way to make it work again is to powercycle the IMU and select a lower baudrate.

The behaviour is the same whether connected to serial card or to usb by a serial-to-usb adapter.

Any help would be greatly appreciated it!

Hernan

Hernan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions