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

Client Software on Linux? #4

Closed
CEngelbrecht opened this issue Oct 31, 2016 · 18 comments
Closed

Client Software on Linux? #4

CEngelbrecht opened this issue Oct 31, 2016 · 18 comments

Comments

@CEngelbrecht
Copy link

Hi Travis, I'm new to the Galactic Aztec Heavy avionics team as of Fall 2016. On my personal PC I'm running Ubuntu, and was wondering if there was a way to get the data acq software to run on my machine.

Regards
Christian

@twyatt
Copy link
Owner

twyatt commented Oct 31, 2016

I'll try to setup some Linux builds for you that could be easily downloaded.

If you're eager to get it going you could follow the Build From Source instructions for OS X. The build.command script was intended for OS X but the only OS X specific command is that last open command that simply opens the output folder for convenience. Everything else in the build.command script should be compatible with a standard Linux distro so might be able to build the client on your Ubuntu box.

The server side was written specifically for the Raspberry Pi's GPIO, so it might run on your Ubuntu box but only in testing mode.

@CEngelbrecht
Copy link
Author

CEngelbrecht commented Nov 1, 2016

Thank you, the build worked.

Under the client/build/libs folder there is client.jar file, but running it with java -jar client.jar gives me

no main manifest attribute, in client.jar

I'm not used to running Java on my machine, so my apologies if this is obvious.
Under your readme you say to navigate to client/build/jfx/native/ but jfx does not exist.

What we're trying to do is transducer calibration, and all the plumbing is set up just fine with our pressure tank, but I couldn't get any readings from the ADC. What I was doing was just running the ReadPressures.py program (not sure if you wrote that?) while SSH'd into the Pi, but as I said this gave no readings. All the ethernet ports were occupied and hooked up to the ducers, but the raw voltage readings from all the ADCs were zero. I've been looking into this client to see if there's a solution here.

@twyatt
Copy link
Owner

twyatt commented Nov 1, 2016

Did the build produce any files in the client/build/jfx/native/ folder? As that is where the application launcher would be placed (which would properly launch the client.jar, and fix the error you are seeing).

The ReadPressures.py was written by Jacob Dodson I believe.

If you follow the Getting Started instructions then it should start the server application that I wrote on the Pi:

wget -qO- https://github.com/twyatt/galactic-aztec-heavy-data-acquisition/releases/download/1.0.0/server.tar | tar xv
server/bin/server --allow-no-logs

The first line will download/install the server software on the Pi. The second line will start the server software.

If it starts properly (without any errors) then press ? and then Enter and it should show you a list of available options, one of which allows you to list the current ADC readings.

You also will need to have the Galactic Aztec Heavy Raspberry Pi Add-on: ADC board plugged into the Pi in order to get ADC readings. Alternatively you could launch the server in Testing mode to at least run with test data, which might help if you are trying to get the client software to connect with the server.

@twyatt
Copy link
Owner

twyatt commented Nov 1, 2016

I attempted to build the project in an Ubuntu Docker and had some trouble with ASCII encoding and dependency changes, so I'll try to resolve the issues and push the changes soon so that you can build the client under Ubuntu.

@CEngelbrecht
Copy link
Author

CEngelbrecht commented Nov 1, 2016

After the build, in my client folder I have these folders.

  • classes
  • dependency-cache
  • libs
  • resources
  • tmp

Within classes there are some java class files:
GaugeController.class
GaugeSettings.class
MainController$2.class
MainController.class
GaugeController$Mode.class
MainController$1.class
MainController$3.class

But besides that, the folders are pretty sparse.

Thanks for attempting the build. There is a Windows laptop, Ryan's, that we're also trying to use, but I'm having networking troubles using it. Simply put, trying to SSH into it using Putty isn't working. I know its static IP is 10.42.0.230, I've got internet and network sharing enabled (it's windows 10), and I've tried when firewall is disabled, but I simply can't connect to it. On my machine, a simple ssh pi@10.42.0.230 works just fine, but I can't get in. Hence, I'm trying to use my ubuntu laptop as the client.

@CEngelbrecht
Copy link
Author

CEngelbrecht commented Nov 1, 2016

So I tried to rebuild, and I may have been overly optimistic earlier. Now when I rebuild, I have a dependency issue:

Build failed with an exception.

Could not find com.pi4j:pi4j-device:1.1-SNAPSHOT.
Searched in the following locations:
https://jcenter.bintray.com/com/pi4j/pi4j-device/1.1-SNAPSHOT/maven-metadata.xml
https://jcenter.bintray.com/com/pi4j/pi4j-device/1.1-SNAPSHOT/pi4j-device-1.1-SNAPSHOT.pom
https://jcenter.bintray.com/com/pi4j/pi4j-device/1.1-SNAPSHOT/pi4j-device-1.1-SNAPSHOT.jar
https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-device/1.1-SNAPSHOT/maven-metadata.xml
https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-device/1.1-SNAPSHOT/pi4j-device-1.1-SNAPSHOT.pom
https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-device/1.1-SNAPSHOT/pi4j-device-1.1-SNAPSHOT.jar
Required by:
twyatt-galactic-aztec-heavy-data-acquisition-b74f9f9:server:unspecified

Could not find com.pi4j:pi4j-gpio-extension:1.1-SNAPSHOT.
Searched in the following locations:
https://jcenter.bintray.com/com/pi4j/pi4j-gpio-extension/1.1-SNAPSHOT/maven-metadata.xml
https://jcenter.bintray.com/com/pi4j/pi4j-gpio-extension/1.1-SNAPSHOT/pi4j-gpio-extension-1.1-SNAPSHOT.pom
https://jcenter.bintray.com/com/pi4j/pi4j-gpio-extension/1.1-SNAPSHOT/pi4j-gpio-extension-1.1-SNAPSHOT.jar
https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-gpio-extension/1.1-SNAPSHOT/maven-metadata.xml
https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-gpio-extension/1.1-SNAPSHOT/pi4j-gpio-extension-1.1-SNAPSHOT.pom
https://oss.sonatype.org/content/groups/public/com/pi4j/pi4j-gpio-extension/1.1-SNAPSHOT/pi4j-gpio-extension-1.1-SNAPSHOT.jar
Required by:
twyatt-galactic-aztec-heavy-data-acquisition-b74f9f9:server:unspecified

@twyatt
Copy link
Owner

twyatt commented Nov 1, 2016

Yup, that is the dependency issue I saw as well. I'll try to fix that soon.

@CEngelbrecht
Copy link
Author

CEngelbrecht commented Nov 1, 2016

In the meantime:

I can run the server on the Pi with the ADC board attached, and run a when the server is running with --allow-no-logs to show instantaneous ADC values, but I'd like to be able to log them. We have a tank with air to calibrate with for the next few hours. Is this possible?

@twyatt
Copy link
Owner

twyatt commented Nov 1, 2016

The logging simply needs a folder to save logs to, so just make a folder,
say "logs" for example, then run the server with that folder as it's only
argument and it will save the ADC log data to that folder.

On Tue, Nov 1, 2016, 4:32 PM Christian Engelbrecht notifications@github.com
wrote:

In the meantime:

I can run the server on the Pi with the ADC board attached, and run a
when the server with --allow-no-logs has started to show values, but I'd
like to be able to log them. We have a tank with air to calibrate with for
the next few hours. Is this possible?


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#4 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAF-4Vg-pcaaj48KlpW0uhuyHIlQxqq2ks5q58wYgaJpZM4KlnyM
.

@CEngelbrecht
Copy link
Author

Ah, perfect.

@CEngelbrecht
Copy link
Author

CEngelbrecht commented Nov 2, 2016

One more stupid question: A0 through A5 correspond to LOX, Kero, Motor and Helium (and RCS low and high, but those aren't hooked up right now). Are they in that order? Apologies if this is documented somewhere obvious. I.e is A0 Lox, A1 Kero, etc

@twyatt
Copy link
Owner

twyatt commented Nov 2, 2016

The client software is setup for the following configuration:

Channel Pressure Transducer Location
A0 LOX
A1 Kerosene
A2 Helium
A3 Motor
A4 RCS Low
A5 RCS High

But the actual configuration totally depends on how you hook up the Galactic Aztec Heavy Raspberry Pi Add-on: ADC board. The ports on that board are labeled with the A0, A1, etc channels.

@CEngelbrecht
Copy link
Author

We've hooked it up in that configuration. I just wanted to make sure there wasn't a built in software bias towards a particular line, so if we calibrated the lox ducer while it was hooked up to, say A1, and the software assumed it was a kero ducer, then that would make all sorts of issues I'm sure.

@twyatt
Copy link
Owner

twyatt commented Nov 2, 2016

The software doesn't treat the data any differently on the different channels, so as long as you are consistent (use the same channel for the same transducer when calibrating and when recording data) then you'll be fine.

The only thing the software does is display the data differently per channel. Depending on the calibration values that are set in the software it will read different pressures, but it will always record unmodified raw voltage readings.

Also, the Galactic Aztec Heavy Raspberry Pi Add-on: ADC has different ADC chips on channels A4 and A5 than A0 through A3 (see specifications for details). Basically, A0 through A3 will be able to read data faster and with more accuracy because those channels are running the higher end ADS1114 chip.

@twyatt
Copy link
Owner

twyatt commented Nov 2, 2016

@CEngelbrecht please try dataacquisitionclient-1.0.1.deb and let me know if it works for you.

sudo dpkg -i dataacquisitionclient-1.0.1.deb && sudo apt-get install -f

@CEngelbrecht
Copy link
Author

CEngelbrecht commented Nov 2, 2016

The dkpg and install went off without a hitch. I can run java -jar data-acquisition-client.jar in the app folder, which brings up the GUI.

In the main DataAcquisitionClient folder, running ./DataAcquisitionClient does not work, giving

DataAcquisitionClient Class client/Launcher not found.
DataAcquisitionClient Failed to launch JVM

but I'm assuming this is not a problem.

@twyatt
Copy link
Owner

twyatt commented Nov 2, 2016

I suspect the error you're receiving is related to javafx-maven-plugin issue #124. The javafx-maven-plugin is a tool used to package the project.

Running the application directly using java -jar data-acquisition-client.jar is totally fine. Glad it worked for you!

I'll push the changes (and add documentation) so that a Linux distribution is part of the releases published to GitHub when updates are made to the project; so that if any changes are made it will be easy for you to update your installation.

If I have time I'll look into fixing the launcher error you're seeing, but since it works running it directly with Java, it is pretty low on my list, so it's not likely I'll get to it anytime soon.

@twyatt
Copy link
Owner

twyatt commented Nov 3, 2016

Updated build scripts to include Linux packages in the release cycle (on the latest release page) and added Linux specific documentation to the readme.

Also note that all 1.0.x versions are compatible with each other. So a 1.0.1 client can connect and work with a 1.0.0 server (and visa versa).

Opened issue #5 to later address the Linux launcher Class client/Launcher not found error.

Closing out this issue, feel free to create more issues if you need further assistance.

@twyatt twyatt closed this as completed Nov 3, 2016
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

2 participants