mavros simultaneous position and velocity control
I am attempting to set waypoints in a SITL/Gazebo simulation using the PX4 firmware (simulation method explained here). In addition to controlling the position of the quadrotor, I also need to be able to control its velocity. To accomplish this, I am attempting to use mavros, and am publishing to the "/mavros/setpoint_raw/local" topic. However, this does not work to set the position and velocity simultaneously. When using the type_mask "0b0000101111000000" it only sets the position, not the velocity. But, changing the type mask to "0b0000101111000111" works as expected, allowing the velocity to be set. So, it seems that the position setpoint is overriding the velocity setpoint, resulting in a default value for velocity when both values are set.
I have looked at several related github issues (402, 471, 557), but was unable to determine whether or not an official resolution had been achieved. I am currently using ROS Indigo and Gazebo 7, and the PX4 firmware was downloaded from github earlier this week. I tried the mavros version currently on github, and the sudo apt-get install version. Thanks for your help.
takeoff_Waypoint = PositionTarget()
takeoff_Waypoint.header.stamp = rospy.get_rostime()
takeoff_Waypoint.header.frame_id = "1"
takeoff_Waypoint.coordinate_frame = 1
takeoff_Waypoint.type_mask = 0b0000101111000000
takeoff_Waypoint.position.x = x_Pos
takeoff_Waypoint.position.y = y_Pos
takeoff_Waypoint.position.z = travel_Height
takeoff_Waypoint.velocity.x = x_Vel
takeoff_Waypoint.velocity.y = y_Vel
takeoff_Waypoint.velocity.z = z_Vel
takeoff_Waypoint.yaw = yaw_Angle
Have you figured out how to give both position and velocity command at the same time?
No, I just ended up using position control with the default velocities.
Add 794 to the list. Seems like this is not easily achievable, but I'd like to be wrong.