Raspberry pi and Attitude adjustment

No, you don’t need a GUI for the Raspberry Pi

Pymavlink should already be installed. If you enter python in the console it should take you into an interactive python prompt, where you should be able to do things like from pymavlink import mavutil.

To get attitude you can follow the run pyMavlink on companion computer example that I linked to in my first response, but using the type='ATTITUDE' filter that @williangalvani suggested. You can either run that code in the interactive prompt I mentioned earlier, or save it as a .py file (probably best to put such a file in ~companion/tools) and run it using python filename.py (press CTRL+C when you want to exit out from the endless printing loop that it will go into, and type quit() to exit the interactive python prompt if you’re finished with it).

Once you’ve got code in a .py file that does what you want you can add a suitable line to the file ~/companion/.companion.rc to start it. If you start it as a named screen session like the existing ones then it will also be listed as one of the ‘Active Services’ in the companion web-interface System page.

If you haven’t worked with the raspberry pi terminal interface before then you should look up how to use a bash terminal (particularly useful commands are ls, cp, mv, and rm). You can use the nano or vi programs to create or modify files - nano is easier to use for beginners and lists the relevant commands for saving and exiting in the interface, while vi is more powerful but has a harder learning curve.