Running loco positioning problems

All discussions related to the Loco Positioning system
Post Reply
chuhao
Beginner
Posts: 27
Joined: Sat Apr 29, 2017 6:25 am

Running loco positioning problems

Post by chuhao »

Hi

As I met several problems during test autonomous fly, I summarize them here.

1. Place UWB deck at the bottom of crazyflie, otherwise it affects tele radio.
webwxgetmsgimg (1).jpg
I was placing it at drone top. It frequently met connection problem, that radio cannot connect to drone in the client software.

2. Flash crazyflie firmware through radio failed
I followed the steps,

Code: Select all

cd crazyflie-firmware
make clean
make 
make cload
It shows,
python3 -m cfloader flash cf2.bin stm32-fw
Restart the Crazyflie you want to bootload in the next
10 seconds ...
Cannot connect the bootloader!
Makefile:380: recipe for target 'cload' failed
make: *** [cload] Error 255
So, I flash firmware through usb with drone in DFU mode, as https://wiki.bitcraze.io/projects:crazy ... opment:dfu said.

3. launch lps-node failed due to radio permission
roserror.png
I still can't find how to change radio permission. So I have to launch ros file in root mode.

4. cannot found drone position after launch "lps_node"
I launch lps_node by,

Code: Select all

roslaunch bitcraze_lps_estimator dwm_loc_ekf_hover.launch uri:=radio://0/80/250K x:=3 y:=2.3 z:=1.0
But there is only three red dots and one axes in rviz,
lps_rviz.png
I checked rostopic, both "/crazyflie/anchor_makers and /crazyflie/marker are empty.
rosdemo.png
That's all the main problems I met.
Thanks
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Running loco positioning problems

Post by arnaud »

Hi,

Thanks for the detailed question. I will try to answer your points.

1. What radio is affected, the UWB or the 2.4GHz radio? If it is the 2.4GHz radio, you can try to change the datarate to 1M or 2M.

2. Are you restarting the Crazyflie in bootloader mode (ie. by pressing long the on/off button until the blue LED starts blinking, then both blue LED should blink) and do you see any of the LED in the crazyradio blinking when launching 'make cload'?

3. For the permission problem, please see my answer in your other thread: viewtopic.php?f=10&t=2412&p=12219#p12222. Adding a udev rules file will solve the permission problem. Launching ROS and the client in root mode is not advised.

4. For the anchors, in your previous screenshot it seems that it was working, what did you change between the two screenshot and is there any error displayed in the console when starting the launchfile? There is only 3 anchors displayed which might come from the anchor position configuration file. The axis displayed is the setpoint position but the axis representing the Crazyflie position is not in view. I looked at the rosbag you sent on the side and the Crazyflie position is at 9meter by 10 meter (topic /crazyflie/crazyflie_position). This means that the Kalman filter has diverged and is not locking on a position.

Setting the position of the anchor in the Crazyflie could help: https://github.com/bitcraze/crazyflie-f ... .c#L92-L99. Also the fact that only 3 anchors are displayed could be causing the problem (if all the other anchrors are set at 0,0,0 for example).
chuhao
Beginner
Posts: 27
Joined: Sat Apr 29, 2017 6:25 am

Re: Running loco positioning problems

Post by chuhao »

Hi Arnaud

I tried flash firmware for crazyflie and uwb_anchor again. They are all flashed successful. Now the main problem is in question 4.

Everytime I launch the lps-ros file, there are error showed in Rviz,
rvizerror.png
It looks like "crazyflie/base_link" is missing. I'm not sure where goes wrong.

The 3 anchor is because I changed "anchor_position.yaml" file. Now I changed it back to 6 anchors as follow,

Code: Select all

n_anchors: 6
anchor0_pos: [  0,  5,  0]
anchor1_pos: [  6,  5,  0]
anchor2_pos: [  3,  0,  0]
anchor3_pos: [  0,  0, 2.8]
anchor4_pos: [  3,  5, 2.8]
anchor5_pos: [  6,  0, 2.8]
I launched the file,

Code: Select all

roslaunch bitcraze_lps_estimator dwm_loc_ekf_hover.launch uri:=radio://0/80/250K x:=3 y:=2.3 z:=1.0
There is crazyflie position update but the position is so random and I still didn't find why.

So, here is my current question
i) the error in rviz related with "crazyflie/base_link", what does it means and how to solve it?
ii) do I need to change crazeflie address in launch file command? In crazyflie client, it shows drone address is radio://0/80/250K
iii)how to check whether crazeflie is connected after launch file?

Thanks
Chuhao
chuhao
Beginner
Posts: 27
Joined: Sat Apr 29, 2017 6:25 am

Re: Running loco positioning problems

Post by chuhao »

I have a basic idea where goes wrong with error i)
There isn't /crazyflie/base_link frame. So, there is error in RobotModel and Axes.

But I still didn't know how to create /crazyflie/base_link.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: Running loco positioning problems

Post by arnaud »

/crazyflie/base_link should be broadcasted by the ekf_bridge node: https://github.com/bitcraze/lps-ros/blo ... py#L34-L41

Maybe this node is not launched successfully?
Post Reply