Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the velocity 🚀 #85

Closed
lidiaxp opened this issue Jun 28, 2021 · 4 comments
Closed

Change the velocity 🚀 #85

lidiaxp opened this issue Jun 28, 2021 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@lidiaxp
Copy link

lidiaxp commented Jun 28, 2021

Is it possible to change the UAV speed on this system? I'm using the F-450. By the calculations I made the default speed of the UAV is 1.6 m/s, but I would like to know if there is any parameter to increase or decrease this speed. Or a way to turn off control for the UAV to respond to cmd_vel.

Thanks in advance

@lidiaxp lidiaxp added the enhancement New feature or request label Jun 28, 2021
@lidiaxp lidiaxp changed the title Change the velocity🚀 Change the velocity 🚀 Jun 28, 2021
@klaxalk klaxalk self-assigned this Jul 2, 2021
@klaxalk
Copy link
Member

klaxalk commented Aug 6, 2021

The UAV speed is defined by the system "constraints", which are managed by the ConstraintManager. The speed defined within the constraints is the "maximum limit", so the trackers should not allow you to fly faster. So those are the "limits".

However, if you want to control the UAV by specifying the desired speed, please, use the control_manager/velocity_reference topic while the MpcTracker is active.

@lidiaxp
Copy link
Author

lidiaxp commented Aug 11, 2021

I'm trying to set the speed by constrainst_manager.yaml setting the speed and acceleration to 4, and the jerk and snap to 50. But the maximum speed I get is 1.4, do you know why?

MpcTracker is active by default, and even if you set it manually, the control_manager/velocity_reference topic doesn't exist.

@klaxalk
Copy link
Member

klaxalk commented Sep 9, 2021

Please check the topic control_manager/current_constraints to see what is currently set. Beware, If you fly with the MpcController, the current constraints are overridden to much slower than what you set with the ConstraintManager. Also, the topic control_manager/velocity_reference should exist since 4108be5 in uav_core.

@klaxalk klaxalk closed this as completed Oct 8, 2021
@lidiaxp
Copy link
Author

lidiaxp commented Dec 1, 2021

@klaxalk I am using MpcTracker and MpcController to fly. When I check control_manager/current_constraints the constraints are fast (horizontal speed = 8) but when the UAV takeoff the constraints switch to slow (horizontal speed = 1). I updated the MRS and used the topic control_manager/velocity_reference but nothing happens (have tried with services too).

rostopic pub /uav1/control_manager/velocity_reference mrs_msgs/VelocityReferenceStamped "header:
  seq: 0
  stamp:
    secs: 0
    nsecs: 0
  frame_id: ''
reference:
  velocity: {x: 5.0, y: 5.0, z: 5.0}
  altitude: 0.0
  heading: 0.0
  heading_rate: 0.0
  use_altitude: false
  use_heading: false
  use_heading_rate: false" 

I am using RTK as odometry and setting the constraints to fast as follow in these config files (.yaml). And calling them in the start.sh 'Control' "waitForOdometry; roslaunch mrs_uav_general core.launch WORLD_FILE:=./world.yaml config_constraint_manager:=./custom_configs/constraint_manager.yaml config_odometry:=./custom_configs/odometry.yaml".

How do I keep the fast constraints after the takeoff?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants