UAVCAN esc and PWM OUT

#1

Hi,

Simple problem, when I set UAVCAN_ENABLE to 3, it doesn’t set the PWM anymore.
I actually need both, so throttle on uavcan_esc, but servos en PWM (I’m using generic ground vehicle).

(in the rcS file)

 	if param greater UAVCAN_ENABLE 0
then
	# Start core UAVCAN module.
	if uavcan start
	then
		if param greater UAVCAN_ENABLE 1
		then
			# Start UAVCAN firmware update server and dynamic node ID allocation server.
			uavcan start fw

			if param greater UAVCAN_ENABLE 2
			then
				set OUTPUT_MODE uavcan_esc
			fi
		fi
	else
		# Error tune.
		tune_control play -t 2
	fi
fi

What do I need to set?

Thanks,

Mich

#2

Hi, you need to check in rc.interface. Enabling UAVCAN moves the MAIN mixer to UAVCAN and the AUX mixer stays on FMU.
This means that you should put your ESC in the MAIN mixer and the servos in the AUX mixer (I guess now everything is in the MAIN mixer).

Good luck!

1 Like
#3

Hi,

Thanks a lot for your reply!
I checked the rc.interface, and I agree:

if [ $OUTPUT_MODE = uavcan_esc ]
then
	set OUTPUT_DEV /dev/uavcan/esc
fi

Which means that /dev/pwm_output0 is not enable anymore apparently.

In my mixer, I did this:

# Set mixer
set MIXER ugv_generic
set MIXER_AUX ugv_generic

set PWM_OUT 1234

Which to my understanding should mix duplicate send the pwm commands.
It does work.

Again, thanks a lot for you reply