Goodevening,
I am trying to set my control system of the drone Iris but I am not able to send trust values to the drone due to some errors. Following a list of command which I use to start the simulation
Navigate to the folder
cd ~/Desktop/PX4-Autopilot
Start simulation with px4
make px4_sitl gazebo_iris
Starting mavros
ros2 run mavros mavros_node --ros-args -p fcu_url:=udp://:14540@
Here I get an error about transformation which have been solved with
ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 map base_link_frd
Setting the mode
ros2 service call /mavros/set_mode mavros_msgs/srv/SetMode "{custom_mode: 'OFFBOARD'}"
Arming the drone
ros2 service call /mavros/cmd/arming mavros_msgs/srv/CommandBool "{value: true}"
Give a setpoint
ros2 topic pub /mavros/setpoint_position/local geometry_msgs/msg/PoseStamped "
header:
frame_id: 'map'
pose:
position:
x: 0.0
y: 0.0
z: 0.5
orientation:
w: 1.0
" --rate 10
Sometimes I first publish the setpoint and later arm the drone, I do not remeber which configuration work but the drone hover at desired position, so the simulation work.
Now I pass to MANUAL mode because I want manually command the motors
ros2 service call /mavros/set_mode mavros_msgs/srv/SetMode "{custom_mode: 'MANUAL'}"
Arming the drone again because it turn off
ros2 service call /mavros/cmd/arming mavros_msgs/srv/CommandBool "{value: true}"
But I get error doing that, even if I do
ros2 topic pub /mavros/actuator_control mavros_msgs/msg/ActuatorControl "
group_mix: 0
controls: [0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8, 0.8]
"
Before arming the drone. Following the error
ros2 service call /mavros/cmd/arming mavros_msgs/srv/CommandBool "{value: true}"
requester: making request: mavros_msgs.srv.CommandBool_Request(value=True)
response:
mavros_msgs.srv.CommandBool_Response(success=False, result=1)
I have done several check but I can’t figure it out
N.B: I changed some parameters with px4 shell but nothing works. I am on Ubuntu 20.04, ROS2 Foxy, Gazebo classic