Camera follow another vehicle

I think this PR affects Mount as well as Camera. Would you consider adding a parameter, something like MNTx_SYSID_TARGET that, if set, would make the mount track the other vehicle?

To bring this thread back on topic :=)

1 Like

Building a rover is a new experience for me and presents new challenges. Where do I put the GPS/compass? The crawler has two motors, one on the front axle one on the rear, like a Tesla (red, black, blue, yellow wires). The motors are brushed, so DC current. Probably want to stay away from that. Probably want to stay away from the gimbal also. Do I put the compass on a stick, like this where a quadcopter?

Yes, that should do. You don’t have a lot space on that style crawler so no choice really.

1 Like

@iter,

Yes, that’s a good idea. I’ve added an issue although I can’t immediately promise when it will be implemented.

1 Like

Thank you, @rmackay9 . Let me know how I can support this effort.

Ari.

The camera is here.

I misunderstood the mounting pattern. Need to print a new plate.

Ari.

While I’m redesigning the camera mount and figuring out where to put my many antennas, I decided to try a sort of baseline–a worst case against which I can compare improvements. The GPS/compass puck sits directly on top of two brushed ESCs, next to battery wires and front motor’s wires.

I was expecting to see wild swings in reported magnetic heading as I applied throttle. Nothing of the sort happened. Telemetry heading in MP and in yaapu on my TX stayed constant. The rover was stationary and had no GPS lock.

I see two immediate possibilities: I’m looking at the wrong reading (EKF hides the problem, if I look at raw magnetometer readings, I’ll see swings) OR, I’ve been overestimating the magnetic interference problem, and my attempts at arranging the components just so are a form of cargo-cult ritual.

Ari.

@rmackay9 can you share your experience of compass/DC interference in ground vehicles?

I made some runs outside and noticed a lot of “compass variance” messages. I attributed those to DC interference that the EKF treats differently when the vehicle is moving. I moved the compass to a mast and in a 30-minute run got only one or two variance messages–but I still got them. Is it possible to see them in a log? Here’s the log of a run with multiple variance messages. (I’m unable to push the long run’s log to GitHub as it exceeds 100MB… Is there a way to split a log into segments?)
https://github.com/arikrupnik/ardupilot-config/blob/master/logs/GROUND_ROVER/18/2023-03-04%2014-54-02.first-runs.bin?raw=true


Run Magfit. Like you would in a copter drive some figure 8’s and vary the throttle.

You should create a new post. This has nothing to do with how this thread started.

I have no experience with copters. Most of my experience is with fixed wing aircraft.

Run Magfit anyway the vehicle doesn’t matter.

To bring this back on topic, I made a new mount, this time with the correct bolt pattern. I have the camera plugged into the board, but something is missing. I can’t immediately see that any actions from Mission Planner (“Set Mount” “RC Targeting”, etc.) are having an effect. I also get messages about Failed to init: RCx_OPTION: and Invalid channel option for options 166, 167, 213, 214. I’m running latest stable Rover, 4.2.3. The relevant parts of my config are here:

Screenshot_2023-03-06_17-27-38

Apparently, stable Rover does not include these aux functions. @rmackay9 do you know if there are plans to update stable Rover to include RC_Channel.cpp from this commit?

@iter,

I think they are included in the Rover beta… we just haven’t been able to release the stable version of Rover-4.3.0 due to questions about navigation performance.

1 Like

Thank you, Randy. I installed Rover 4.3.0-beta and the error messages went away. I can control the gimbal in RC mode. MAVLink targeting produces a pitch oscillation. I made a short video.

Ari.

Hi Randy - should this be working now?

I installed an A8 Mini on my EDU650 and set MNT1_DEFLT_MODE = 5 (SysID Target) and MNT1_SYSID_DFLT = 15 (Mavlink ID of my plane).

Both vehicles are running 4.5.1 and my PC is connected to both vehicles. I loitered the drone about 20m up in the air left it hovering while I drove the plane around on the ground below it. The camera didn’t try to track the vehicle. It just stayed stationary.

Should the camera on the drone track the plane? Am I missing anything?