LPS visualization don't work[solved]

Firmware/software/electronics/mechanics
Post Reply
gwiily
Beginner
Posts: 20
Joined: Wed Dec 02, 2015 2:12 am

LPS visualization don't work[solved]

Post by gwiily »

Hi all

I successfully follow your instructions about getting started with LPS : https://wiki.bitcraze.io/doc:lps:index
Each anchor is set with the rignt number as anchors.
The crazyflie have new firmware. (anchor also new firmware)

In RViz the green dot don't move when I tried to move the Crazyflie

ROS display a error like the picture. And in the client, the date is normal.
ros.png
client.png
And I use this command

Code: Select all

rostopic echo /ranging
It shows the error:

Code: Select all

ERROR: Cannot load message class for [bitcraze_lps_estimator/RangeArray]. Are your messages built?
Any help would be appreciated.
gwiily
Last edited by gwiily on Wed Nov 16, 2016 12:47 am, edited 1 time in total.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LPS visualization don't work

Post by arnaud »

Hi,

The message from rostopic comes from fact that the workspace 'devel/setup.bash' has not been sourced in your terminal and maybe you are missing the catkin_make step. This file should be sourced in all the terminal you are using. One way is to add the line:

Code: Select all

source $HOME/catkin_ws/devel/setup.bash
in your ~/.bashrc. Also did you run catkin_make in your workspace after cloning all the projects?

For the visualisation it seems that not all the nodes are launched correctly. If the problem persist could you send an image of rtq_graph?
gwiily
Beginner
Posts: 20
Joined: Wed Dec 02, 2015 2:12 am

Re: LPS visualization don't work

Post by gwiily »

arnaud wrote:Hi,

The message from rostopic comes from fact that the workspace 'devel/setup.bash' has not been sourced in your terminal and maybe you are missing the catkin_make step. This file should be sourced in all the terminal you are using. One way is to add the line:

Code: Select all

source $HOME/catkin_ws/devel/setup.bash
in your ~/.bashrc. Also did you run catkin_make in your workspace after cloning all the projects?

For the visualisation it seems that not all the nodes are launched correctly. If the problem persist could you send an image of rtq_graph?

I modify it according to your prompts. And I did catkin_make before. The rtq_graph image is this?
2016-10-25 10-45-43屏幕截图.png
I run rostopic again,but it's no response.
2016-10-25 10-45-59屏幕截图.png
gwiily
Beginner
Posts: 20
Joined: Wed Dec 02, 2015 2:12 am

Re: LPS visualization don't work

Post by gwiily »

Maybe the crazyradio does't work,Normally,I use the "sudo cfclient" to run the cfclient,but I don't know how to run ros with super user.
gwiily
Beginner
Posts: 20
Joined: Wed Dec 02, 2015 2:12 am

Re: LPS visualization don't work

Post by gwiily »

I try to run ros with super user,and it worked. When I move the plane , the green point moved.

But now I try to control it with gamepad, the plane has no response.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LPS visualization don't work

Post by arnaud »

You should setup udev to be able to run without superuser right. See there: https://github.com/bitcraze/crazyflie-lib-python#linux

Can you describe a bit more your problem:
1 - What launchfile are you using
2 - Are you using an x-box gamepad
3 - What are you doing that does not work (ie. what button, ....)
gwiily
Beginner
Posts: 20
Joined: Wed Dec 02, 2015 2:12 am

Re: LPS visualization don't work

Post by gwiily »

arnaud wrote:You should setup udev to be able to run without superuser right. See there: https://github.com/bitcraze/crazyflie-lib-python#linux

Can you describe a bit more your problem:
1 - What launchfile are you using
2 - Are you using an x-box gamepad
3 - What are you doing that does not work (ie. what button, ....)
Thanks for your reply.
1 - Actually I don't understand the launchfile you said.
2 - I am not using an x-box gamepad,but it recognized as a x-box in the cfclient.
2016-10-27 21-01-08屏幕截图.png
3 - After run this command :

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
The RV worked , and I read the mapping,but the gamepad can't let it fly.

Thanks for your patience again.
arnaud
Bitcraze
Posts: 2538
Joined: Tue Feb 06, 2007 12:36 pm

Re: LPS visualization don't work

Post by arnaud »

Hi, thanks for the screenshot I might have an idea of what is going wrong.

Your laptop exposes an accelerometer as a joystick, and the launchfiles are setup to use the first joystick. In your case it is not the xbox gamepad but the laptop accelerometer.

You can try to change the used joystick with:

Code: Select all

roslaunch bitcraze_lps_estimator dwm_loc_ekf_hover.launch joy_dev:=/dev/input/js1 uri:=radio://0/80/250K x:=3 y:=2.3 z:=1.0
Best regards,
Arnaud
gwiily
Beginner
Posts: 20
Joined: Wed Dec 02, 2015 2:12 am

Re: LPS visualization don't work

Post by gwiily »

This really has the effect!

Thanks!
Post Reply