Hi.
I am trying to emulate on an ArduRover missions working on an Arducopter over a real R/C circuit. The car is a competition 1/10 one (with steering servo and ESC), although I start limiting throttle pulse width on the controller (SERVO2_MAX=1580), although this can be done as well on the transmitter.
Transmitter used is a Futaba T3VCS three channel radio. Steering (ch1) and throttle (ch2) are assigned normally, and ch3 on a knob is used to change mode. Note that since I don’t know to arm the rover with a ch1+ch2 sticks combination, the rover is always armed (ARMING_REQUIRE=0).
I use Mission Planner as GCS. Car controller is a clone Pixhawk v2.
As examples of missions to emulate (Copter) over the real car R/C circuit:
Example 1 mission drone
Example 2 mission drone
Drone controller is also a clone Pixhawk v2. Transmitter is a Futaba T7C and receiver is a FrSky TFR4-B, with PPM output (no PPM Encoder needed). It has two GPS’s; first one has a 5988 compass (external one). I try to use same electronics and configurations on the Copter and Rover. Drone and car communicate with GCS with 3DR radios.
The car receiver is a Futaba R603FS. Its outputs are connected to a PPM Encoder: ch1 and ch2 normally, and ch3 to ch5. On the controller MODE_CH=5. The PPM Encoder output is connected to Pixhawk PPM input. Pixhawk main outputs 1 and 2 are connected to car steering servo and ESC.
The car Pixhawk has connections to two GPS’s. GPS1 has a LIS3MDL compass; for whatever the reason it is not recognized, so I don’t connect its I2C SCL/SDA signals and use instead a module with a 5888 compass (external), with its dot oriented front-right (Roll180), the same as in the drone. Second compass is the Pixhawk one (internal), the same as in the drone.
The car has also two sonars at the front (chinese analog and I2C, both with HC-SR04).
The steps for making everything work would be:
1). Basic car movement (modes Normal, Acro and Steering). Works (latency is clear in car handling).
2). Guided and Auto modes (compasses and GPS’s working; missions). FAR FROM WORKING.
3). SmartRTL mode.
4). Sonars (front obstacles avoidance).
If missions work, speed would be increased, and accelerometer lateral measurements would be used to reduce speed as needed, so as to improve lap time.
But I am completely stuck at 2: nothing works, and is really far from working. For example, on Guided mode the car turns and goes opposite to desired point. This sounds as a compass problem, but:
-Compasses (external and internal) are almost the same in drone and car.
-I copy the configuration on drone and car (same external one orientation, (Roll180)).
-Calibration on drone and car succeeds (both external and internal compasses).
Sounds as if rover doesn’t know how to translate desired actions towards the steering servo for whatever the reason.
Questions:
-Am I missing something?
-Any wrong or missing parameter below?
-How can I start to make Guided and Auto modes to work?
Any help deeply appreciated. Thanks for reading.
GCS messages:
EKF2 IMU0 in-flight yaw alignment complete
PX4v2 004B0036 3436510A 32393637
PX4: fc469199 NuttX: 1bcae90b
APM:Rover V3.2.3 (261f998f)
Relevant parameters:
AHRS_EKF_TYPE,2
AHRS_GPS_USE,1
AHRS_ORIENTATION,0
ARMING_REQUIRE,0
BTN_ENABLE,0
COMPASS_EXTERN2,0
COMPASS_EXTERN3,0
COMPASS_EXTERNAL,1
COMPASS_ORIENT,8
COMPASS_ORIENT2,0
COMPASS_ORIENT3,0
COMPASS_PRIMARY,0
COMPASS_TYPEMASK,0
COMPASS_USE,1
COMPASS_USE2,1
COMPASS_USE3,0
CRUISE_SPEED,2
CRUISE_THROTTLE,50
EK2_ENABLE,1
EK3_ENABLE,0
FRAME_CLASS,1
FS_ACTION,2
FS_CRASH_CHECK,0
FS_GCS_ENABLE,0
FS_THR_ENABLE,1
FS_THR_VALUE,910
FS_TIMEOUT,5
GCS_PID_MASK,1
GPS_TYPE,1
GPS_TYPE2,1
INITIAL_MODE,0
MAG_ENABLE,1
MODE_CH,5
MODE1,0
MODE2,1
MODE3,3
MODE4,4
MODE5,10
MODE6,15
PILOT_STEER_TYPE,0
PIVOT_TURN_ANGLE,30
RC1_DZ,30
RC1_MAX,2014
RC1_MIN,1008
RC1_REVERSED,0
RC1_TRIM,1545
RC2_DZ,30
RC2_MAX,1906
RC2_MIN,1049
RC2_REVERSED,0
RC2_TRIM,1511
RC5_DZ,0
RC5_MAX,1970
RC5_MIN,1069
RC5_REVERSED,0
RC5_TRIM,1340
RCMAP_PITCH,3
RCMAP_ROLL,1
RCMAP_THROTTLE,2
RCMAP_YAW,4
RNGFND_TYPE,1
RTL_SPEED,0
SERVO_RATE,50
SERVO2_MAX,1580
SPEED_TURN_GAIN,50
TURN_MAX_G,1
TURN_RADIUS,0.9
WP_OVERSHOOT,2
WP_RADIUS,2
WP_SPEED,0
Rest: moreless default.