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

iCubGenova09 (iRonCub3) S/N:000 – Increase the IMU frequency over 200 Hz #1821

Open
davidegorbani opened this issue Jun 4, 2024 · 7 comments
Assignees
Labels
iCubGenova09 (iRonCub3) S/N:000 iCub 3 pinned This label prevents an issue from being closed automatically

Comments

@davidegorbani
Copy link

Robot Name πŸ€–

iCubGenova09 (iRonCub3) S/N:000

Request/Failure description

We would like to increase the frequency at which the IMU streams data over 200 Hz.

Detailed context

We were doing some tests in order to increase the frequency at which the IMU sends data over 200 Hz, which is the current frequency at which the IMU works now. Our IMU is the Xsens MTi-680G and it is connected to the head of the robot through the serial port; we tried to increase the frequency of the IMU to 400 Hz with mtmanager, the GUI provided by Xsens, but it was throwing an error that was suggesting to increase the baud rate of the port because some packets were lost. We tried to increase the baud rate of the serial port, but it seems like it is not possible to increase it over 115200.

CC @gabrielenava @DanielePucci

Additional context

No response

How does it affect you?

No response

@github-actions github-actions bot changed the title Increase the IMU frequency over 200 Hz iCubGenova09 (iRonCub3) S/N:000 – Increase the IMU frequency over 200 Hz Jun 4, 2024
@Nicogene
Copy link
Member

Nicogene commented Jun 4, 2024

In serial communication the baud rate = bit rate = the value of the clock cycle.

I don't know how many bits is a packet sent by the IMU, but by doubling the rate probably we are reaching the limit of the bandwidth of the serial we have on the COM express (is it connected to the COM express right?) (we should investigate that limit cc @maggia80 @fgarini).

@davidegorbani can you provide the size of the data you are asking to the device in bits?

@maggia80
Copy link
Contributor

maggia80 commented Jun 4, 2024

Yes, @davidegorbani you should check how many data you want to receive and add a small % for considering the overhead of the protocol (if you don't have access to it).
Check in the datasheet which is the max baudrate for the sensor and test it outside of the robot, or with the motors switched off. There could be also errors due to noise.

@davidegorbani
Copy link
Author

davidegorbani commented Jun 4, 2024

is it connected to the COM express right?

Yes, correct.

We are receiving from the IMU roll, pitch, yaw and angular velocity at 200 Hz and linear acceleration and magnetometer reading at 100 Hz; all of them are vectors of three double elements so once we receive a packet with 12 doubles and once a packet with 6 doubles so on average we computed that we get 576 bits without considering the overhead of the protocol. So if we compute the bit per second we get 576*200 = 115200.
This confirms that we have to increase the baud rate but it seems that is not allowed for the serial port of icub-head (/dev/ttyS0)

@HosameldinMohamed
Copy link

This confirms that we have to increase the baud rate but it seems that is not allowed for the serial port of icub-head (/dev/ttyS0)

Is there a limit on the baud rate of the built-in serial port on iCub-head (/dev/ttyS0) that it can't be over 115200? Because with USB (/dev/ttyUSBx) we can increase the baud rate to higher values.

@davidelasagna
Copy link

If I am not mistaken, the max baud rate for RS-232 standard is 115200. The type 10 supports also RS-485 (which should supports higher baud rates) as shown in the documentation.
I think that the cable provided for the com port has only 2 wires attached to the pins for the RS-232 T/S.
There is also the jumper configuration to check.

image
image

@fgarini
Copy link

fgarini commented Jun 5, 2024

Thanks @davidelasagna for the documentation reference.
Unfortunately I didn't found any specification about the driver of RS-232 interface in the Type 10 Mini carrier user manual.
However, looking in the non-Mini version, they say:
image
image
if we are lucky and they mount the same driver the speed is configurable, you can at least try with 230400 baud.

@davidegorbani
Copy link
Author

Thanks for the help. We tried to increase the baud rate of the port with the command stty -F /dev/ttyS0 230400 even with sudo permission but we got the following output: unable to perform all requested operations; if we try with a baud rate lower than 115200 we don't get the error.

@gabrielenava gabrielenava added the pinned This label prevents an issue from being closed automatically label Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
iCubGenova09 (iRonCub3) S/N:000 iCub 3 pinned This label prevents an issue from being closed automatically
Projects
Status: Triage
Development

No branches or pull requests

8 participants