Hello , for my application a i need to change the HOME position by ROS and micro xrce /client agent.
I use the topic /fmu/in/vehicle_command to do this :
def send_home_position_command(self):
for _ in range(5):
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 = False
print(f"Commande de position de départ envoyée avec les paramètres : param5 (latitude) = {command.param5}, param6 (longitude) = {command.param6}, param7 (altitude) = {command.param7}")
self.command_publisher.publish(command)
time.sleep(1)
The command is correctly published on the good topic and I recive a command_ack, but the ACK is always 1 "temporary rejected "?!!
Why px4 reject my command ?
How can i change the home position via ros ?
Thanks