-
Notifications
You must be signed in to change notification settings - Fork 41
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
Trouble interfacing with Raspberry Pi #19
Comments
@adarshrs at first, check if your user is added to |
@twdragon I have verified that the user is added. I am also able to communicate with the raspberry pi over the serial port from an arduino, so it looks like serial communication is working. However, I see no output from the sensor in Picocom on the raspberry pi. I am still able to see output from the sensor using an arduino |
@adarshrs as you described that you can see the Raspberry console from Arduino, here is the problem: the UART transceiver of Raspberry could be monopolized for being used as a serial console port. You should run the Raspberry Pi configuration utility and change the port setting not to redirect the system console TTY to it. If you confirm this test successfully, I will close this issue as not connected to the project itself but to the 3rd party software settings. |
@twdragon I have done this configuration already, enabling the serial hardware but disabling the console. To clarify, I could not see the raspberry pi console on the arduino. I was able to send string messages from the arduino to the raspberry pi and see them on picocom |
@adarshrs did you test duplex data transfer? On which baudrate and mode does your port work? Did you try to play with the controller applications of the underlying library to determine the exact baudrate and mode? Also, did you try to listen on |
@twdragon Update: I was able to see symbols on picocom with the IMU connected. Not sure what changed, but it looks like the IMU is sending data. The ROS driver doesn't still work, though. Here are the logs when I try to launch: Rosout:
Log:
|
@adarshrs the log says:
It means that the data are not really already thrown to the port while the node tries to call |
@twdragon I tried out different baud rates and polling frequencies. According to the data sheet, the default baud rate is 9600. I changed the polling rate to 50ms and 100ms and get the same timeout error in each case. I don't get the error when running at 20ms, however. I ran message enumeration and this is the output:
This does not produce the error, but no messages are published either. This is the output of the roslaunch:
There is no output after this and no messages published. |
@adarshrs I did not see before: your sensor does not provide Quaternion orientation packet whilst
This situation is explained here in the node documentation. If you want to utilize native quaternion orientation, you must enable it on your hardware using the controller application from the underlying library. I also will be very appreciated if you will be able to provide a test report in the Issues section. |
@adarshrs if you will present here the positive result of your test, I will close this issue as solved. |
@twdragon Thank you for your suggestion. Turning off native orientation worked and I am able to get /imu messages at 10Hz. I tried using the underlying library to increase the polling rate using the following command:
The output suggests that this works, however, I get a segmentation fault when trying to read at a polling interval of 5 ms (100 Hz). At lower frequency 50 Hz, I am seeing messages published at a rate of 16 Hz. Is this a hardware limitation or is there some way of getting higher publish rates? I am looking for rates of at least 100 Hz, ideally 200 Hz. |
@adarshrs as it is described here there is a limitation due to the sensor may throw the packets on the given frequency, but the ROS IMU message is built from at least 2 Witmotion packets. There is also a synchronization limitation due to the ratio between the selected baudrate and measurement frequency. The highest measurement frequencies, obviously, are accessible only on the highest baudrates. I heard some use cases (e.a @tohax) with actual publishing frequencies up to 160 Hz, so the limitation exists. In your case I can advice you to use the commands:
to set the packet throw interval to 5ms, as it is described here, and to check if the 7ms polling interval works, otherwise, try to increase it. Do not forget that the default controller application baudrate is 9600 baud. Then try to play with the actual port polling interval using the As the device is now working, I will close this issue as completed. I will be very appreciated if you would write a test report for Raspberry setup in the dedicated issue. To discuss the limitations, I encourage you to open a different issue, if needed. |
I am running ROS Noetic on a Raspberry Pi and am trying to interface WT901 with this node. I have the IMU connected to the serial ports on the Raspberry Pi (tx, rx -> rx, tx) but the node cannot communicate with the IMU on the correct serial port and baud rate. I communicated with the IMU over I2C on the Raspberry Pi using a custom driver and UART on Arduino using sample code on the witmotion website. Is there something I am missing with respect to getting this ROS driver to work on a Raspberry Pi?
The text was updated successfully, but these errors were encountered: