Hello i try to set the home to a custom location via ros2 :
I Pubish on the topic /fmu/in/vehicle_command,(command 179)
def send_home_position_command(self):
command = VehicleCommand()
command.timestamp = int(self.get_clock().now().to_msg().sec * 1e9)
command.command = VehicleCommand.VEHICLE_CMD_DO_SET_HOME
command.param1 = 0.0
command.param5 = float(self.latitude_cible)
command.param6 = float(self.longitude_cible)
command.param7 = float(self.altitude_cible)
command.confirmation = 1
command.target_system = 1
command.target_component = 1
command.source_system = 255
command.source_component = 0
command.from_external = True
I see the command on /fmu/in/vehicle_command :
zit@minipads:~$ ros2 topic echo /fmu/in/vehicle_command
timestamp: 1703065519000000000
param1: 0.0
param2: 0.0
param3: 0.0
param4: 0.0
param5: 43.22222
param6: 1.22222
param7: 250.0
command: 179
target_system: 1
target_component: 1
source_system: 255
source_component: 0
confirmation: 1
from_external: true
and i recive the ack on /fmu/out/vehicule_command_ack, but the awnser is 2 ,
Blockquote
uint8 VEHICLE_CMD_RESULT_DENIED = 2 # Command PERMANENTLY DENIED |
so my command do_set_home is rejected ? why ? where i’m wrong ?
how can i set the home correctly via ros2 and micro xrce ?
Thanks for your help