In my project, I will be receiving input data via an onboard LiDAR. Using this information, the drone will need to navigate a maze and find the exit. My ultimate goal is to implement some SLAM algorithm, but I would like to start out simpler to get a better understanding of the off board system and what not.
The issue I am having is controlling the drone such as the forward speed and the yaw rate. What Mavros topic should I be subscribing to?
I have tried “mavros/setpoint_velocity/cmd_vel”, but the drone moves along the x-axis of the map, not the x-axis of the drone. For example, when I set a yaw_rate of one radian/sec and an x velocity of 1 m/s, I would expect the drone to fly in a circle. However, the drone simply spins along its z-axis while it flies in a straight line along the x-axis of the map.
I have turned to using “mavros/setpoint_raw/local” which gives me the commands I want, but I am not sure if this is the proper way to do it? I am slowly figure this stuff out and need some advice.
I am using ROS1-Noetic.
Thanks.