Comments (11)
Thanks for opening your first issue here! Make sure that no other issues on the same topic have already been opened!
from crazys.
I took a look at the code. The actual Crazyflie control architecture does not allow to use the joystick. I will start working on this. Please, stay tuned on this issue for updates.
I will also update the README.md file with instructions.
EDIT
The issue is now related to the new milestones: 4.0.8, 5.02, 6.0.2.
from crazys.
I've just completed the interface for all releases of CrazyS releases. Tomorrow I will test it and let you know. If it works, I will merge it into the master (and the proper branches) and update the README.md file with instructions on how to use it.
from crazys.
The new feature has been added to the repository. Thus, I close the issue.
from crazys.
Thrust commands work as expected but the roll and pitch commands are not working. The drone is only able to take flight and not tilt as per the roll and pitch commands.
from crazys.
What do you mean exactly? Did you try to change the gains in the roll_pitch_yawrate_thrust_controller_crazyflie2.yaml
file? It may be a problem related to the on-board control architecture.
from crazys.
But the roll_pitch_yaw_thrust_controller
is not using the on-board controller. It has a rate and attitude controller of it's own, right?
I didn't change the gains in the yaml file but even without that it should be able to work right?
When I send only roll/pitch commands with the joystick without any thrust, the corresponding 2 adjacent propellers should start rotating, but that does not happen.
I echoed the PWMs and the PWM values constantly keep rising when the roll/pitch axis is kept at some value other than zero.
from crazys.
Yes, the file uses the Crazyflie’s onboard controller. As for the real device, when you control the drone by using the joypad, the onboard controller manages to drive the motors.
It depends. What do you mean with right?
No! If you don’t apply any thrust, the propellers will never rotate. If you don’t thrust me, try with real device if you have it.
I didn’t get the last point. Could you be more clear?
from crazys.
The RollPitchYawrateThrustControllerCrazyflie gets it's odometry from the gazebo odometry plugin, right? The state of the drone is set on the basis of this odometry message which is received in the world frame, which means that the attitude and angular velocities of the drone are set in the world frame.
However, the PWM calculations are done to give angular velocities to the motor in the local coordinate system of the drone.
To give an example, if the drone was facing backwards such that the back motors are pointing in +x direction and the front motors are pointing in the -x direction, and a pitch command is given to tilt the drone towards the +x direction, the motor angular velocities will be calculated such that the back motors rotate faster than the front motors and the drone will actually tilt towards the -x direction.
The odometry message will tell the drone that it is tilting towards the -x direction, but the pitch command received is still trying to achieve a +x tilt, so the PID controllers will keep increasing the delta_phi, delta_theta, delta_psi commands but will never be able to reach the setpoint.
Basically, the joystick commands being received and the motor angular velocities being calculated are in the local frame of the drone and the odometry messages received are in the world frame, which would yield incorrect results.
Does this sound right to you?
from crazys.
Yes, you are right. The RollPitchYawrateThrustControllerCrazyflie
gets the drone state from the odometry message. As you can see from here, the odometry plugin
expresses the linear and the angular velocities in body frame. If you don't trust (please, check for yourself because I could be wrong), try to rotate those measurements and see what happens.
What you are describing is modeled by the equations reported in the Control Mixer
. To better understand the control architecture, I suggest you read what is described in the reference paper (you find all references in the Wiki).
I may not have understood correctly, but I don't totally agree with you. As you can see from the reference paper, tilting around the y-axis you generate a pitch angle (theta) and not w.r.t. x-axis. Also, the way that the pitch angle increase should be different. If you don't trust (again, I could be wrong), create the map (PWM equations mentioned before) between the motors spinning and the command signals. The rows of the matrix are the motors velocities, while the columns are the command signals, i.e., thrust, roll, pitch, and yaw rate.
from crazys.
Yes, you're right! Sorry, I made that error about the pitch angle, I meant rate. Thanks for being so prompt with the answers, this is brilliant work!
from crazys.
Related Issues (20)
- opticalFlow.pb.h: HOT 2
- Question regarding publishing motor speed to Gazebo & some theoretical parameters HOT 6
- Unrecognized message type mav_msgs/Actuators. HOT 7
- Noetic Controller Package HOT 4
- rotors_gazebo_plugins:make error HOT 8
- Virtual Reality Integration HOT 4
- ROS GAZEBO HOT 6
- Virtual Reality Integration HOT 13
- Cannot make it work on Melodic HOT 2
- Some issues on installation in ubuntu 20.04 HOT 10
- Adding a custom MAV HOT 6
- Catkin Build Issues HOT 5
- Quadcopter not flying HOT 2
- Leap Motion Integration HOT 4
- using the packages with ros noetic HOT 5
- Trouble with crazyflie2 hovering example. [Ubuntu 18.04, ROS Melodic, Gazebo 9] HOT 22
- name 'namespace' is not defined HOT 2
- Missing blades after using my own controller HOT 13
- Is it possible to use CrazyS at the same time with the real crazyflie? HOT 2
- Is it possible to forcefully stop the drone/s when it reached a target location? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from crazys.