Closed chaos4ros2 closed 3 years ago
Can you share the output of the micro-ROS Agent with -v6
flag enabled?
I'm not confident that this way of doing is good. based on this issue I typed
sudo docker exec -it micro-ros_crazyflie_demo_cf_agent_1 /bin/bash
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/pts/checked_number -v6
and in another terminal
sudo docker exec -it micro-ros_crazyflie_demo_cf_client_1 /bin/bash
cfclient
here is the output
Everytime I pushed scan button, crazyflie rebooted and turned into「Self test fail」state.
I feel like I understood a little.
I tried and confirmed the following:
Can't put Crazyflie 2.1 in recovery bootloader mode like this video. => There seems to be a problem with bootloader.
Bin bootloader recovery follow the tutorial. You can see the bootloader uses address 0x08000000.
BIN file DFU flashing. The firmware uses address 0x08004000.
I flashed the micro-ROS fireware into address 0x08000000 that is prepared for bootloader.
So overflash may be the problem and here is my question: How can I flash the micro-ROS firmware with DFU mode in a docker container or flash it to a specified address.
Hi @chaos4ros2,
I don't think thats the problem, as specified on this link:
If the Crazyflie 2.X firmware was compiled with CLOAD=1 (default option) the binary should be flashed after the bootloader at address 0x08004000.
But we are building with CLOAD=0
: link.
I think the problem may be related to the interaction between the demo and the agent. I am currently working on this, will come back with updates.
Anyway, you can change the address by modifying this line: https://github.com/micro-ROS/micro_ros_setup/blob/galactic/config/freertos/crazyflie21/flash.sh#L5
Hi @Acuadros95,
I don't think thats the problem, as specified on this link: If the Crazyflie 2.X firmware was compiled with CLOAD=1 (default option) the binary should be flashed after the bootloader at address 0x08004000. But we are building with CLOAD=0: link.
I have learned a lot from you. Thank you very much.
I think the problem may be related to the interaction between the demo and the agent. I am currently working on this, will come back with updates.
This will be very helpful for me! I am waiting for you to come back.
Anyway, you can change the address by modifying this line: https://github.com/micro-ROS/micro_ros_setup/blob/galactic/config/freertos/crazyflie21/flash.sh#L5
I learn something new again, thanks for teaching me the way to modify address. Because I don't have any experience with embedded system, I am going to try it after testing your updates.
Hello @chaos4ros2,
We just made a big update on this demo, please update your repos/dockers and give it a try. Feel free to ask any questions and give feedback.
Hello Acuadros95,
I am trying your update and getting stuck in How to prepare the Raspberry Pi applications?
I got a error like blow when I typed
sudo docker run -ti --rm microros/base:galactic
error:
chaos@chaos:~/ros2/drone_ws/micro-ROS_crazyflie_demo$ sudo docker run -ti --rm microros/base:galactic
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
standard_init_linux.go:228: exec user process caused: exec format error
Sorry to bother you again. I have another question about how to control drone with only one Crazyradio PA.
I found that two channels are used in crazyflie's firmware. One for publishing sensor data and the other one for commanding crazyflie with a controller. The tutorial says it is just need one Crazyradio PA, but is it possible to use two channels with one Crazyradio PA?
I am trying your update and getting stuck in How to prepare the Raspberry Pi applications?
This tutorial is intended to cross-compile the applications from a regular computer, and I guess you are running the docker inside the raspberry.
I found that two channels are used in crazyflie's firmware.
Yes, the crazyflie demo is a very specific use case, where two different Crazyradios are used. If you want to test micro-ROS, I advise you to try the position publisher example instead.
You can use micro-ROS and command the crazyflie with a controller using only one crazyflie with that example. You can also just run the demo and just connect to the main task.
I ran two demos and confirm the results.
Tf datas are correctly plotted in rviz2 in crazyflie_demo sample and /drone/attitude(odometry) are correctly sended by drone in crazyflie_position_publisher sample. And I can command the crazyflie with a controller at the same time !
crazyflie_demo's result :
crazyflie_position_publisher's result :
Thanks for the amazing demo and answer. It motivates me to study ROS2 and use micro-ROS. I am going to master micro-ROS via these demos.
I also created a PR to fix the node.js vision problem during set up cf_visualizer container.
Issue template
Steps to reproduce the issue
I'm trying to run the micro-ros demo with crazyflie2.1
Run the docker compose and build with
Put Crazyflie in DFU mode and check with
The terminal outside the container is in DFU mode but the terminal inside container is in BOOTLOADER mode like these
Expected behavior
micro-ROS firmware is flashed successfully and Connect to Crazyflie successfully.
Actual behavior
Messages showed in terminal loos okay but when I connected to Crazyflie with cfclient (after docker-compose up -d), Crazyflie turned into 「Self test fail」(The right front LED (1) is repeatedly blinking five short red pulses with a longer pause between groups.)
Additional information
Is there something wrong and how can I check everything is ok?