-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
A java problem with make posix jmavsim in Ubuntu #9557
Comments
We really only test stuff on Ubuntu 16.04 and we have only tested regularly ROS Kinetic.
I work primarily on a Ubuntu VM in Windows and have historically been using jMAVSim for quick tests. Unfortunately this no longer works in the VM, so I feel your pain. That said, I have found Gazebo running headless to be similarly performant to jMAVSim (slower to build first time, but about the same when running). To do this you basically prefix your make command with @TSC21 Has work been done to validate/test PX4 and MAVRos with ROS Melodic? |
I am using a real computer, and ROS is less of a problem: I do appreciate the delicate link between ros and ubuntu distros, so I rely on another computer running ubuntu 16.04 and Kinetic for ros. The trouble with jmavsim is that I can't isolate the issue. Is it a problem with java? Incompatible ubuntu distro? I'd greatly appreciate some advice to point me in the direction of a diagnosis. |
The second error looks like you have a mismatched JDK and JRE - ie you're running jMAVSIM compiled using a JDK later than 8. Did you do a clean build before trying? Other than that I don't know. Julian's suggestion of Java 8 is what we use in our docker environments, and I think is the likely pain point. I'd love this fixed but jMAVSim problems aren't IMO treated as high priority as say Gazebo ones. So if you can work with Gazebo headless that would be smart. |
When you switched to java 8? Did you make sure |
I proceeded with deleting all of
Build is not successful and shows the following
Is using openjdk instead of oracle java likely to cause this issue? I might not be able to rebuild with oracle-8-java just yet because of some minor problems. |
No, we use open jdk in our docker setup. |
MAVROS is already available for ROS Melodic. |
@TSC21 Thanks! Is it time to update our docs/install scripts etc to target ROS Melodic (instead of Kinetic) - or is there a need for both/it is too early? Or to put it another way, what should be the trigger for me to do this? |
Okay, the problem is solved by using the following version of java.
Build succeeded and jmavsim is up and running. One question remaining: Why does Oracle java succeed while Openjdk fail? |
Hi i got the same error and i have these versions of java |
@Paschy11 it looks like you need to use Oracle Java and not OpenJDK. |
I'm using Oracle java right now and i have these: |
I ran into this too. In my case I didn't do a clean build. Deleting all of On a side note, I've been using ROS Melodic with PX4/MAVROS with no problem. Let me know if there's anything I can do to help with the migration to Melodic (or updating stuff abt jMavsim) |
I just ran into this again. Oracle Java is not needed, OpenJDK 8 is fine.
and comment out the following line like this:
Fix found here: https://askubuntu.com/questions/695560 |
@hamishwillee we could add a note in a troubleshooting section |
Done: PX4/PX4-Devguide#846 |
Thanks @julianoes . Merged. I was aware of that, but it was still sitting on my todo list. Much appreciated. |
@julianoes thanks, it worked for me |
The line is already commented out, but the error is still there, please give some solution to this |
https://dev.px4.io/master/en/simulation/jmavsim.html#troubleshooting Do this before trying again:
|
This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there: https://discuss.px4.io/t/error-on-jmavsim-simulation/33908/2 |
Hello everybody, I hit a snag with jmavsim SITL simulation on ubuntu but I tried to strictly follow instructions. I run Ubuntu 18.04 (Bionic), gazebo 9 and ROS Melodic. Firmware and submodules are up to date.
My problem is that
make posix jmavsim
results in an error as shown below.I believe this is not a new issue, as it appeared to be almost identical to #9311, with the exception that I use ubuntu. My Java version is
Per @julianoes 's suggestion, switching to Java 8 (either java-8-openjdk-amd64 or java-8-oracle) and redoing the build resulted in the following:
Strangely enough, gazebo setup is largely successful and I am able to simulate in both SITL and HITL. Nevertheless I could really use jmavsim as a lighter, faster simulator since I am only concerned with multirotors. Thank you for looking into this issue!
The text was updated successfully, but these errors were encountered: