How to convert navigation stack output from cmd_vel to position command in geometry_msgs/PoseStamped msg type

asked 2016-02-24 11:37:26 -0500

automate gravatar image

Hello I am working on obstacle avoidance for uav.

I am using X8+ UAV which has a pixhawk controller. I am using navigation stack for 2d obstacle avoidance. Navigation stack receives UAV odometry and generates the necessary cmd_vel. I pass this cmd_vel to pixhawk using mavros setpoint_velocity/cmd_vel.

The issue is the uav the complete system works fine for any movement in x and y direction. However the uav doesnt perform the angular z movement. To get rid of this issue and being aware that setpoint_position/local is more tested in mavros I wanted to know if there is a way to convert the /cmd_vel output of navigation stack to position command (in geometry_msgs/PoseStamped msg type)

I am using Ubuntu 14.04, Mavros v0.17, Mavros binaries version Version: 0.16.5-0trusty-20160111-0027-+0000 , Ros Indigo I use ardupilot SITL simulator to test the code

edit retag flag offensive close merge delete

Comments

Did you ever get this question answered? I'm currently working similar problem except I was thinking of using the trajectory path of to generate a list of way points. I do have my drone working with velocity commands, but results aren't that great (very slow and still clips walls when cornering).

uwleahcim gravatar imageuwleahcim ( 2016-07-02 23:55:45 -0500 )edit

I didnt find a way to convert /cmd_vel output to position command. I dotn think thats possible too. I used position control where ever possible. Your idea of using trajectory path to generate way points and feed them into position control sounds like a good idea

automate gravatar imageautomate ( 2016-07-11 13:18:05 -0500 )edit