sudo ./rpiboot$ ssh searchwing@searchwing-drone
or via IP (get from router)
$ ssh searchwing@x.y.z.w
$ sudo ./first_boot_setup.sh
The following tests depend on the successful uploaded parameters to the pixracer. Ensure you did this!
sudo /opt/catkin_ws/src/ros-generic/tools/onboard_usage/save_Factory_Params.sh
Wait until the parameters are downloaded...
Connect /dev/ttyAMA0,500000 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyAMA0
MAV> Detected vehicle 1:1 on link 0
online system 1
MANUAL> Mode MANUAL
AP: ArduPlane V4.3.0dev (252588b9)
AP: c24020ddf1cc4435bbac942c15d7abf0
Received 1364 parameters (ftp)
Saved 1364 parameters to mav.parm
Flight battery 100 percent
If you see the following line parameters are saved as mav.parm to the folder above.
Saved 1364 parameters to mav.parm
Abort the mavproxy connection with STRG+C. This will also restart the searchwing* services.
We can stream the current camera images from the pi to a QGC instance.
nano /opt/catkin_ws/src/ros-generic/searchwing_bringup/scripts/searchwing_image_stream.sh
targetHost="SEARCHWING-TABLET"
Replace SEARCHWING-TABLET with actual hostname!
sudo systemctl restart searchwing_image_stream
nano /opt/catkin_ws/src/ros-generic/searchwing_bringup/launch/in_apm.launch
tgt_system to the used SYSID_THISMAV of the drone (e.g. 2)<arg name="tgt_system" default="2" />
sudo systemctl restart searchwing_payload
$ ssh searchwing@perlman
or
$ ssh searchwing@perlman.local
Did you save the autopilot parameters? The boardcomputer won't take pictures until you execute the
save_Factory_Params.sh.
http:\\perlmancam-r_latest.jpg@$ journalctl -f -u searchwing_payload.service
rostopic echo /box/temperature
rostopic echo /box/humidity
$ sudo systemctl stop searchwing_payload
$ sudo systemctl stop mavlink-router.service
$ mavproxy.py --master=/dev/ttyAMA0,500000
Connect /dev/ttyAMA0,500000 source_system=255
Log Directory:
Telemetry log: mav.tlog
Waiting for heartbeat from /dev/ttyAMA0
MAV> GPS lock at 17 meters
Detected vehicle 16:1 on link 0
online system 16
RTL> Mode RTL
AP: ArduPlane V4.4.0 (710b94a8)
mode MANUAL by writing to the prompt:mode MANUAL
RTL> Got COMMAND_ACK: DO_SET_MODE: ACCEPTED
MANUAL> Mode MANUAL
The plane should be now in manual mode
After your checks restart services afterwards to get ROS running again
sudo systemctl restart "searchwing*" --all
sudo systemctl restart mavlink-router.service
sudo vcdbg log msg
With this you can change code on the pi (here withhostname test) and push it to gitlab.
##########on laptop
scp ~/.ssh/id_rsa searchwing@test:~/.ssh/id_gitlab
scp ~/.gitconfig searchwing@test:~
##########on pi
tee -a ~/.ssh/config << END
Host gitlab.com
Hostname altssh.gitlab.com
User git
Port 443
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_gitlab
END
sudo chmod 700 ~/.ssh/id_gitlab
#set repo to use ssh key
git remote set-url origin git@gitlab.com:searchwing/development/payloads/ros-generic.git
Using the "Visual Studio Code Remote - SSH extension" extension of VSCODE one can visually run and debug (python) code on the pi via a laptop with VSCODE. I use this daily and it makes live easy:
https://code.visualstudio.com/docs/remote/ssh