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

JSBSim ERROR[simulator_mavlink]Number of simulated accelerometer out of range :Max:3 #65

Open
YCJ0815 opened this issue Oct 19, 2023 · 2 comments

Comments

@YCJ0815
Copy link

YCJ0815 commented Oct 19, 2023

image
When I try to interface JSBSim with PX4 SITL, it reports an error in this picture. But it does not report error if I try more times. It seems like random appears.
I just use make px4_sitl jsbsim in the terminal. Also I can interface gazebo with PX4 SITL successfully. Anyone has the same problem?And anyone knows how to resolve this.

@Lallie101
Copy link

mavlink_interface.cpp, at around line 273, add the line sensor_msg.id = 0;

@mikebevz
Copy link

mikebevz commented Feb 7, 2025

It resolved the issue. However, if I have 3 IMUs then the first one is working as expected, but the second and third seem to be defunct.

[vehicle_imu] 0 - Accel: 1310988, interval: 4000.0 us (SD 0.0 us), Gyro: 1310988, interval: 4000.0 us (SD 0.0 us)
vehicle_imu: accel data gap: 0 events
vehicle_imu: gyro data gap: 0 events
ACC 1310988 EN: 1, offset: [0.000 0.000 0.000], scale: [1.000 1.000 1.000], Internal
GYRO 1310988 EN: 1, offset: [0.000 0.000 0.000], Internal

[vehicle_imu] 1 - Accel: 0, interval: 0.0 us (SD -0.0 us), Gyro: 0, interval: 0.0 us (SD -0.0 us)
vehicle_imu: accel data gap: 0 events
vehicle_imu: gyro data gap: 0 events
ACC 0 EN: 1, offset: [0.000 0.000 0.000], scale: [1.000 1.000 1.000], Internal
GYRO 0 EN: 1, offset: [0.000 0.000 0.000], Internal

[vehicle_imu] 2 - Accel: 0, interval: 0.0 us (SD -0.0 us), Gyro: 0, interval: 0.0 us (SD -0.0 us)
vehicle_imu: accel data gap: 0 events
vehicle_imu: gyro data gap: 0 events
ACC 0 EN: 1, offset: [0.000 0.000 0.000], scale: [1.000 1.000 1.000], Internal
GYRO 0 EN: 1, offset: [0.000 0.000 0.000], Internal

Any suggestion on how to fix it? Is there any design document for jsbsim-bridge?

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

No branches or pull requests

3 participants