Hello everybody,
I followed this guide using pre-build image for the RPI4, it boots and I can login to apsync with no problem.
https://ardupilot.org/copter/docs/common-vio-tracking-camera.html
The firmware is copter 4.1.2.
On mission planner I get: “PreArm: VisOdom: not healty”, so I can’t arm the drone, and I can’t find any info about that anywhere.
Do you have any useful advice?
Thank you,
FaMa
I’m still stucked here. Do you have any useful advice?
ppoirier
(ppoirier)
January 2, 2022, 1:08pm
3
Hello,
Does the Companion Computer feed the Flight Controler with the vision_position message ?
https://ardupilot.org/copter/docs/common-vio-tracking-camera.html#verification-before-testing
No, it doesn’t. What could it means?
ppoirier
(ppoirier)
January 2, 2022, 7:18pm
5
It means that you need to make it work on the CC before connecting to FC
So you go back to step One of the wiki and you follow through again… and again until you see the message on Mavlink
I tried mounting again and again different pre-built images, but at the end I’m again with the APSync Ubuntu image from here .
Still same problem, but I found out some errors on the boot:
[FAILED] Failed to start Load Kernel Modules
See ‘systemctl status systemd-modules-load.service’ for details
[FAILED] Failed to start MAVLink Router.
See “systemctl status mavlink-router.service” for details.
I have no clue about how to fix them. And I don’t get why there are such errors in an image that should work without any further intervention.
Any suggestion?
ppoirier
(ppoirier)
January 6, 2022, 9:15am
7
Well it might not be plug and play… first just make sure the realsense working on the CC using the rs-pose and other Intel utilities
I already did it. rs-pose works fine. The proble must be on the mavlink router:
[FAILED] Failed to start MAVLink Router.
See “systemctl status mavlink-router.service” for details.
But I can’t fix it.
ppoirier
(ppoirier)
January 6, 2022, 10:28am
9
OK
Take a look at the error on the journal
journalctl -u mavlink-router.service -b
And if you start the script manually with --debug_enable 1 should see the poses on console
I managed to make mavlink-router work, but still
I don’t have
ppoirier:
vision_position message
I’m trying resetting parameters
ppoirier
(ppoirier)
January 6, 2022, 11:32am
11
I repeat
start the script t265_to_mavlink.py manually with --debug_enable 1 should see the poses on console
I suggest you go through Thien posts on the T265 , all the required information is there
You are right, I did it, it says: Connection Error! Retrying…
and go on repeating this forever
Maybe the connection between the pixhawk PX4 and the Raspberry PI4 is wrong?
I connected them this way, using the telem2 port of the PX4.
t265_to_mavlink can’t connect to the vehicle, so probably I need to change the connection_string_default. The problem is, Pixhawk PX4 doesn’t seem to be recognised as a device using dmesg command.
ppoirier
(ppoirier)
January 6, 2022, 4:39pm
14
Oh… Have you disable bluetooth and assign port to ttyAMA0 ?
https://openenergymonitor.org/forum-archive/node/12311.html
# Following, an example of configuration file:
[General]
#ReportStats=true
MavlinkDialect=ardupilotmega
TcpServerPort=0
#Log=flightstack.log
DebugLogLevel=info
StatsFilePath=/tmp/cmavnode-links.txt
###################################
# AutoPilot Endpoint #
###################################
[UartEndpoint to_fc]
Device = /dev/ttyS0
Baud = 921600
#[TcpEndpoint to_fc]
#Address = 127.0.0.1
#Port = 5760
###################################
Those link are pretty old, but as far as I can understand bluetooth is already disabled.
Should I change this part of mavlink-router.conf?
[UartEndpoint to_fc]
Device = /dev/ttyS0
Baud = 921600
Cuz I tried but no luck.
I edited it this way:
[UartEndpoint to_fc]
Device = /dev/ttyAMA0
Baud = 115200
accordingly on what I see in /boot/firmware/nobtcmd.txt (included in /boot/firmware/config.txt)
… console=ttyAMA0,115200 …
Now if I run /home/apsync/start_t265_to_mavlink.py it abort after 30 second, maybe it need more time. Now I’m trying to give it more time.
I edited /usr/local/lib/python3.6/dist-packages/dronekit/init .py in different way, but I’m pretty sure it didn’t had any effect. Still aborting after 30 sec.
ppoirier
(ppoirier)
January 7, 2022, 7:39pm
18
Looks like You have not changed the serial speed on the FC so match the modification.
@stephendade do you have any comments/recommendation on this issue ?
These are the parameters I setted:
[SERIAL2_PROTOCOL] = 2 (I use telem2 on pixhawk)
[SERIAL2_BAUD] = 115
[AHRS_EKF_TYPE] = 3
[EK2_ENABLE] = 0
[EK3_ENABLE] = 1
[EK3_SRC1_POSXY] = 6
[EK3_SRC1_VELXY] = 6
[EK3_SRC1_POSZ] = 1
[EK3_SRC1_VELZ] = 6
[GPS_TYPE] = 0
[VISO_TYPE] = 2
Is this what you meant?
[SERIAL2_BAUD] = 115
In that case nothing changed
A few things:
If you’re using the Pi’s UART on the 40-pin header (GPIO14/15) to connect to the flight controller, use /dev/serial0
in your config.
Also ensure that the Pi’s console is disabled on that port - use sudo raspi-config nonint do_serial 2
to disable.