Skip to content

Commit ab55a1a

Browse files
zacnyjegomoscGerardo E. Cruz-Ortiz
authored and
Gerardo E. Cruz-Ortiz
committed
Convert Guide-GroundSystem.txt file content to Markdown, save it into new file: Guide-GroundSystem.md and remove old txt doc file.
1 parent cff1c00 commit ab55a1a

File tree

1 file changed

+178
-0
lines changed

1 file changed

+178
-0
lines changed

Guide-GroundSystem.md

+178
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# cFS Ground System Version 2.1.5
2+
3+
## cFS Ground System Info
4+
5+
The GroundSystem directory contains the new Ground System project for the cFS, that incorporates the main window to launch commands and telemetry systems, and other utilities like FDL/FUL and FT managers to send and receive files. The main window runs alongside the Routing Service (`RoutingService.py`). The Routing Service handles all incoming data and publishes (PUB/SUB) the data to specific ZeroMQ channels so that the different ground system utilities can receive (subscribe) only the desired data.
6+
7+
This ground system supports commanding and receiving telemetry from multiple spacecrafts using UDP.
8+
9+
The Ground System contains the main window that lets you launch the different utilities.
10+
11+
To start receiving data from the cFS, you need to enable telemetry first. To enable telemetry:
12+
- click the "Start Command System" button from the main window,
13+
- then from the Command System Main Page click the "Enable Tlm" button (you will need to enter the target/destination IP address as an input to this command).
14+
15+
Note: The Main Window needs to be opened at all times so that the telemetry messages can be forwarded to the Telemetry System.
16+
17+
The Ground System will automatically detect the spacecraft when it starts sending the telemetry, and it will be added to the IP addresses list. You can select the spacecraft from the list, and start Telemetry System to receive its data. If 'All' spacecrafts are selected, you can start Telemetry System to display the packet count from multiple spacecrafts (if it detected more than one).
18+
19+
Future enhancements:
20+
1. Detect different spacecrafts based on telemetry header (spacecraft `id`) data instead of using the spacecraft IP address.
21+
1. Add instructions for Windows.
22+
23+
## Install and run
24+
25+
Before launching the Ground System make sure that:
26+
- PyQt4 is installed,
27+
- PyZMQ is installed,
28+
- cmdUtil is compiled.
29+
30+
Installing and running cFS Ground System on Ubuntu:
31+
32+
1. ```sudo apt-get install python3-pyqt4```
33+
1. ```sudo apt-get install python3-zmq```
34+
1. ```sudo apt-get install libcanberra-gtk-module```
35+
1. ```cd Subsystems/cmdUtil/ && make```
36+
1. ```python3 GroundSystem.py```
37+
38+
The historically included instructions for running on macOS or CentOS are included at the bottom of this document for reference.
39+
Please note that instructions have not been maintained.
40+
Welcoming instruction contributions if any of these are your platform of choice.
41+
42+
## Adding new flight software application to ground system command GUI
43+
44+
This section was made to help developers who are adding core Flight Software (cFS) Applications to the Python-based Ground System that comes with this cFS distribution.
45+
46+
The `CHeaderParser.py` program that should be found in:
47+
48+
```GroundSystem/Subsystems/cmdGui```
49+
50+
Is an interactive, command-line based program to help walk developers through the process of adding custom cFS applications to the Ground System. Along with `CHeaderParser.py` is a configuration file that CHeaderParser uses to find the proper header files for your "new" cFS application. This file is named `CHeaderParser-hdr-paths.txt`, and should be placed in the same directory as `CHeaderParser.py`.
51+
52+
Expected file structure:
53+
```
54+
cFE-6.4.x-OSS-release/cfe/tools/cFS-GroundSystem/Subsystems/cmdGui/CHeaderParser.py
55+
cFE-6.4.x-OSS-release/cfe/tools/cFS-GroundSystem/Subsystems/cmdGui/CHeaderParser-hdr-paths.txt
56+
cFE-6.4.x-OSS-release/cfe/tools/cFS-GroundSystem/Subsystems/cmdGui/CommandFiles/
57+
cFE-6.4.x-OSS-release/cfe/tools/cFS-GroundSystem/Subsystems/cmdGui/ParameterFiles/
58+
cFE-6.4.x-OSS-release/cfe/tools/cFS-GroundSystem/Subsystems/cmdGui/command-pages.txt
59+
```
60+
Steps to adding application commands to the Ground System:
61+
62+
1. Edit `CHeaderParser-hdr-paths.txt`:
63+
1. Locate any header files that contain command code definitions or command structure definitions. These files typically end in `*app_msg.h` or `*app_msgdefs.h` but could be named anything.
64+
1. Add each one of the paths to a new line in `CHeaderParser-hdr-paths.txt`.
65+
1. Comment out any paths/lines that aren't needed with `#` (at the beginning of the line).
66+
67+
1. Run CHeaderParser:
68+
1. Call CHeaderParser using python: `python3 CHeaderParser.py`
69+
1. The program will prompt you to enter a filename for the application. This will create a pickle file for your application named `CommandFiles/<user_defined_name>`. Notice that this file will be stored in the `CommandFiles` directory. This same filename will be used in `command-pages.txt` later.
70+
1. Type `yes` if any commands in your application have parameters. The program will then look through the provided header files for `definitions.pick` which-ever definitions describe related command codes (one at a time, the program will prompt you for the next command code after all parameters have been added for the current command).
71+
1. Select the appropriate command structure for the selected command. The program will show all structures that it could find in the provided header files. Enter the index of the command structure (the corresponding index should be above the command structure).
72+
1. Select any parameters from the structure that apply. Once you have selected all applicable lines from the command structure, enter `-1` to finish. This will create a pickle file for the command/parameters named `ParameterFiles/<command_name>`. Notice that this file will be stored in the `ParameterFiles` directory.
73+
74+
1. Update `command-pages.txt` (CSV):
75+
1. Column 1 - Title of your application (whatever you want it called).
76+
1. Column 2 - filename of your application (chosen in Step 2.ii) under `CommandFiles` directory.
77+
1. Column 3 - Message ID for Application Commands (typically defined in `mission_msgids.h`).
78+
1. Column 4 - Endianess (default little endian: `LE`).
79+
1. Column 5 - PyGUI Page (default: `UdpCommands.py`).
80+
1. Column 6 - Command Send Address (default: `127.0.0.1`).
81+
1. Column 7 - Command Send Port (default: `1234`).
82+
83+
Notes:
84+
- USE ONLY SPACES, NO TABS (Remember, it's Python).
85+
- Don't leave any empty lines in `command-pages.txt`, this could cause errors when running `GroundSystem.py` and `CommandSystem.py`.
86+
87+
After completing these steps, restart the Ground System and the changes should have taken affect.
88+
89+
## Common issues and troubleshooting
90+
91+
### Issue: Cannot Send Command, receiving the "[Errno 8] Exec format error"
92+
93+
Traceback:
94+
95+
```
96+
Calling cmdUtil from Parameter.py
97+
Traceback (most recent call last):
98+
File "Parameter.py", line 100, in ProcessSendButton
99+
subprocess.Popen(cmd_args, stdout=subprocess.PIPE)
100+
File "/usr/lib/python3.7/subprocess.py", line 642, in __init__
101+
errread, errwrite)
102+
File "/usr/lib/python3.7/subprocess.py", line 1234, in _execute_child
103+
raise child_exception
104+
OSError: [Errno 8] Exec format error
105+
```
106+
107+
Fix: This problem is most likely caused by calling `cmdUtil` without compiling it. This issue has also been found to occur when the `cmdUtil` executable has been compressed/decompressed. To fix this problem, use the `Makefile` inside of the `cmdUtil` directory to compile or recompile (in the case after decompressing).
108+
109+
```
110+
$ cd Subsystems/cmdUtil
111+
$ make
112+
$ cd ../..
113+
$ python3 GroundSystem.py
114+
```
115+
116+
## Historically included instructions for running on macOS or CentOS
117+
118+
### Installing and running cFS Ground System on macOS, using Homebrew
119+
120+
```
121+
$ brew install pyqt
122+
$ brew install zeromq
123+
$ ( cd Subsystems/cmdUtil/ && make )
124+
$ python GroundSystem.py
125+
```
126+
127+
### Installing and running cFS Ground System on CentOS 6
128+
129+
#### Update yum
130+
```
131+
$ su
132+
$ <type password>
133+
$ yum -y update
134+
```
135+
136+
#### Install pip and python-development ####
137+
If you are on a 64-bit CentOS / RHEL based system:
138+
```
139+
$ wget http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
140+
$ rpm -ivh epel-release-6-8.noarch.rpm
141+
```
142+
143+
If you are on a 32-bit CentOS / RHEL based system:
144+
```
145+
$ wget http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
146+
$ rpm -ivh epel-release-6-8.noarch.rpm
147+
$ yum install -y python-pip
148+
$ yum install -y python-devel
149+
```
150+
151+
#### Install zeroMQ and pyZMQ messaging system ####
152+
```
153+
$ yum install -y uuid-devel
154+
$ yum install -y pkgconfig
155+
$ yum install -y libtool
156+
$ yum install -y gcc-c++
157+
$ wget http://download.zeromq.org/zeromq-4.0.5.tar.gz
158+
$ tar xzvf zeromq-4.0.5.tar.gz
159+
$ cd zeromq-4.0.5
160+
$ ./configure
161+
$ make
162+
$ make install
163+
$ echo /usr/local/lib > /etc/ld.so.conf.d/local.conf
164+
$ ldconfig
165+
$ pip install pyzmq
166+
```
167+
168+
#### Install pyQT4 ####
169+
```
170+
$ yum install -y PyQt4
171+
$ yum install -y qt qt-demos qt-designer qt4 qt4-designer
172+
```
173+
174+
175+
#### Running Ground System ###
176+
```
177+
$ python GroundSystem.py
178+
```

0 commit comments

Comments
 (0)