I got my drone setup with MAVROS and Q Ground Control and it appears to be responding when I publish to /mavros/setpoint_velocity/cmd_vel_unstamped
However, there's some issues with the drone's response. I've only tested it moving purely vertically up and it is unstable / doesn't respond right away.
For publishing to the topic I made my own ros node (velocity_publisher.py) that lets me input the desired velocity in the form (vx,vy,vz,wz). This input corresponds to the movement in m/s (or rad/s) in the drone's forwards (vx), left (vy), and up (vz) directions, with wz corresponding to rotation along the z (up) axis. I confirmed that I am publishing correctly when using rostopic echo. I confirm that these directions are correct; I have moved the VOXL FLight deck itself powered up but un-attached to the drone while observing rostopic echo /mavros/local_position/velocity_body.
For testing, my steps were as follows:
1 - Open QGround Control and 3 terminals. On each of the terminals I ssh to the drone.
2 - On terminal 1 I run MAVROS as per your instructions here: https://docs.modalai.com/mavros/
3 - On terminal 2, I run velocity_publisher.py
4 - On terminal 3, I arm the drone using rosservice call /mavros/cmd/arming True
5 - On terminal 2 I input my desired command velocity.
Here are my issues:
1 - I publish (0,0,vz,0). The drone doesn't move until (approx) vz>0.5. This is an issue if I want the drone to move at a speed less than 0.5 m/s.
2 - When the drone is moving it is unstable and drifts undesirably. While I input (0,0,vz,0), I only want it to move straight up. However, it clearly has very noticeable lateral motion.
3 - Some motors are sluggish to start when arming.
Some theories as to the cause of the issue:
1 - Improperly calibrated ESCs. They were calibrated as per the steps here: https://docs.modalai.com/flight-core-pwm-esc-calibration/
Though, I did change the PWM_MAIN_MIN / PWM_MAIN_MAX parameters on QGRoundControl. I'll reset them to factory defaults and re-calibrate everything.
2 - Improperly calibrated sensors, especially gyroscope. I don't think this is an issue I calibrated on Q Ground control using a wired connection. But same as # 1, I can reset the parameters on Q Ground Control and re-calibrate everything,
3 - Misaligned propellers. I can re-assemble the mounts for the motors to ensure each of them are properly aligned.
I will be resetting the parameters and recalibrating everything on the VOXL Flight deck as well as re-assembling the propeller mounts. What else should I look at?