Comments (14)
This could be either an issue with the communication (high packet drop rate) or an issue with tracking.
- How did you determine channel 37 to be good? A nice tool is https://github.com/bitcraze/crazyflie-lib-python/blob/master/examples/radio-test.py.
- Do you have the LED ring installed? It is color-coded and tells you if the communication is good (green) or bad (red).
- Are all markers tracked correctly when you fly 3 or more? You could record the pointcloud topic and tf during the execution during a crash. A replay of those topics should allow you to see if the tracking is good at least before/at the beginning of the crash.
The original crazyflie_ros only works well with up to 2 CFs per radio, because the controller is running on the PC (rather the CF), and it doesn't use broadcasting commands.
from crazyswarm.
I determined the best channel using the tool that was specified. Unfortunately I do not have the led ring. I am adding 6 more cameras today to improve tracking and will try recording the data afterwards to see if the problem lays in tracking or communication. Also there sometimes seems to be a slight problem in the ICP from time to time where it calculates the position slightly incorrectly, or on original startup the orientation is calculated incorrectly. I am using 5 markers that are not placed symmetrically. Also I am using the same marker configuration for all the crazyflies but it seems the markers on a few of them are slightly off (not noticeably)(currently not using these for the current testing) and the ICP struggles to converge. What would be the best approach to this problem? Should I relax the ICP or define marker configurations for each one in the launch file?
from crazyswarm.
How do you know that the position is calculated incorrectly? On startup, we try several possible orientations (https://github.com/USC-ACTLab/libobjecttracker/blob/master/src/object_tracker.cpp#L186) and take the best one. You can try increasing that number and see if that improves your tracking. We only use four markers and have no such problems.
It is expected that you can't place the markers perfectly identical. There is currently no full support for different marker configurations per CF (we are working on that though). You can try adjusting the fitness score (which is the sum of the error squared between measured marker position and expected marker position based on the current transformation): https://github.com/USC-ACTLab/crazyswarm/blob/master/ros_ws/src/crazyswarm/launch/hover_swarm.launch#L82. Naturally, this number needs to be higher if you use 5 instead of 4 markers.
You could also try the marker configuration that works well for us. You can find a picture showing the markers in J. A. Preiss*, W. Hönig*, G. S. Sukhatme, and N. Ayanian. "Crazyswarm: A Large Nano-Quadcopter Swarm", in Proc. IEEE International Conference on Robotics and Automation, Singapore, 2017, Figure 1 (preprint available at http://act.usc.edu/publications.html). We use 7.9mm spherical markers, although that depends on your motion capture system.
from crazyswarm.
What would be the best way to change the channel on a crazyflie on the crazyswarm firmware?
from crazyswarm.
Connect your CF over USB and change it using the Bitcraze Python Client.
from crazyswarm.
So just an update, I got multiple crazy flies working now. After fixing the tracking issue there seem to be crazyflie specific problems. Not sure if its due to propellers coming loose or motors, but I was able to find 4 that were able to execute the figure eight with my marker configuration, proving that there is no communication or tracking issue left. Closing this now.
from crazyswarm.
Hi, @whoenig , @itzzartem
I am trying to use radio-test.py
However, I got the error messages as shown in the following.
~/crazyflie-lib-python$ sudo python examples/radio-test.py
Traceback (most recent call last):
File "examples/radio-test.py", line 19, in <module>
import cflib.drivers.crazyradio as crazyradio
ImportError: No module named cflib.drivers.crazyradio
Could you teach me how to use radio-test.py ?
Thank you in advance
from crazyswarm.
You have to install the CF python lib on your system:
$ cd crazyflie-lib-python
$ pip3 install --user -e .
from crazyswarm.
It works!
I appreciate it!
However, I cannot see any suggested channels....
Do you think the following output is correct?
~/crazyflie-lib-python$ python examples/radio-test.py
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:59: RuntimeWarning: Mean of empty slice.
warnings.warn("Mean of empty slice.", RuntimeWarning)
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:70: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:82: RuntimeWarning: Degrees of freedom <= 0 for slice
warnings.warn("Degrees of freedom <= 0 for slice", RuntimeWarning)
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:94: RuntimeWarning: invalid value encountered in true_divide
arrmean, rcount, out=arrmean, casting='unsafe', subok=False)
/usr/lib/python2.7/dist-packages/numpy/core/_methods.py:116: RuntimeWarning: invalid value encountered in double_scalars
ret = ret.dtype.type(ret / rcount)
('Channel', 0, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 1, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 2, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 3, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 4, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 5, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 6, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 7, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 8, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 9, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 10, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
.
.
.
('Channel', 120, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 121, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 122, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 123, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 124, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
('Channel', 125, 'ack_rate:', 0, 'rssi average:', nan, 'rssi std:', nan)
Suggested Channels:
from crazyswarm.
Hi @whoenig ,
do you have any idea about it?
Thank you in advance..
from crazyswarm.
@srnetsr
That is an incorrect output. Seems like your not actually connected to the crazyflie. Where is the crazyflie when you are running this test? I found that if I started the script with the crazyflie in our fly zone it would give me the output you are getting. If I started it with the crazyflie close to the dongle and then placed it in the fly zone, I got the correct results. Also you could just look at a high frequency analyzer for a more accurate result. You could also get a wifi analysis app and see what wifi channels are being used around you. If you take that approach, wifi channel spacing is much wider than the crazyflie channels so you will have to make the conversion. i.e wifi channel 6 is channel 37 for the crazyflie. Also wifi routers tend to hop channels to find one with least traffic so try to choose one that isn't getting any traffic or is between channels if possible. Don't forget that depending on where you are located, not all channels are legal. In the US, FCC regulations do not allow operation past 2.4835GHz , i.e channel 83.
from crazyswarm.
@itzzartem , thank you for your reply.
But it does not work still. I got the same error.
I flashed nrf and stm into Crazyflie and flashed firmware into CrazyRadio by following http://crazyswarm.readthedocs.io/en/latest/usage.html.
Is it the same environment to yours?
@whoenig , I have a question.
I found bitcraze/crazyflie-lib-python#21
I followed http://crazyswarm.readthedocs.io/en/latest/usage.html, and flash nrf & stm using your instruction.
The question is that what is the difference between https://github.com/bitcraze/crazyflie2-nrf-firmware and cf2_nrf.bin
file in crazyswarm/prebuilt
?
Thank you.
from crazyswarm.
There is no difference - the NRF51 firmware is identical to the latest official one. The prebuilt binary is only there for simplified reproducibility.
from crazyswarm.
Thanks for confirmation, @whoenig
Based on bitcraze/crazyflie-lib-python#21 and information you gave, I tested all cases, and finally what is the problem.
The problem is related with the address of cf2.
I set the address of cf2 as 0xE7E7E7E701
.
This address does not work!
I switched it to 0xE7E7E7E7E7
, and it worked.
I cannot see any information about address in radio-test.py
file, can you find any part for modification?
Thank you guys, though!
from crazyswarm.
Related Issues (20)
- cmdVel() can not use HOT 2
- Crazyswarm 1.0 compatibility with ROS2 Humble? HOT 2
- Latency issues for offboard control using cf.setParam("motorPowerSet/m{i}", motor_power[i]) HOT 6
- Drone state estimation drifting significantly for static drone HOT 5
- Error with collisionavoidance and vispy
- Cant send the crazyflies commands after running another script with ROS HOT 1
- What is the best way to get angular state feedback? HOT 1
- issue with testing hello_world.py and hover_swarm.launch HOT 5
- the libmotioncapture submodule on the master not point(update) to the self main HOT 1
- Uploading more than one trajectory HOT 2
- Crazyflie flips over and crashes immediately HOT 8
- ESTKALMAN: State out of bounds, resetting,TF error
- build.sh issue
- "Motion Capture did not receive data" issue HOT 1
- controller?
- ESTKALMAN: State out of bounds, resetting
- Crazyflie wont show in Rviz
- a question about cmdPosition HOT 1
- Cannot give cmdVel command to all agent...
- 4 base stations in the lighthouse tracking system do not support 5 crazyfiles
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 crazyswarm.