Changing angular velocity of UAV in Gazebo using Twist messages not giving correct rotations

asked 2019-02-26 17:14:46 -0500

smp26 gravatar image

Hi,

I'm currently trying to send angular velocity commands to a quadrotor in Gazebo, visualized in Rviz, through the "cmd_vel" topic using Twist messages. When I set angular.x to a nonzero value and keep angular.y and angular.z at 0, the UAV correctly rotates about the x-axis only. However, strange things happen when I play around with angular.y and angular.z. When I set angular.y to a certain value and keep angular.x and angular.z at 0, the UAV doesn't rotate at all (it just hovers at its current location). Furthermore, when I set angular.z to a certain value and keep angular.x and angular.y at 0, the UAV's angular.z and angular.y both get set to the value I set for angular.z. I played around with this more and found out that this happens even if I set any nonzero value for angular.y. I used the rostopic echo command to confirm that I am publishing the correct velocity commands as well as to see what the actual angular velocities are. I'm unsure as to why this is happening; angular velocities are not being set anywhere else, and I've set the quadrotor's frame to match the world frame. Would it have something to do with the gazebo physics properties (gravity is currently [0,0,0]) or with the characteristics of the UAV when spawned?

I'm running Ubuntu 16.04 on x86 with kernel 4.15.0 and using ROS Kinetic.

Thank you!

edit retag flag offensive close merge delete

Comments

Can you provide more information about your simulation please ? The packages you use, which UAV, your launch files, how are you publishing the velocities etc... You might have another publisher or a node monitoring the velocities not correctly configured (like a velocity smoother node maybe).

Delb gravatar image Delb  ( 2019-02-27 01:25:29 -0500 )edit