Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Oct 18 15:21
    gautierhattenberger commented #2603
  • Oct 18 03:47
    OpenUAS commented #2602
  • Oct 16 18:29
    hendrixgr opened #2603
  • Oct 16 11:31
    gautierhattenberger closed #2600
  • Oct 16 11:31
    gautierhattenberger commented #2600
  • Oct 15 20:42

    gautierhattenberger on master

    Some minor improvements and pro… (compare)

  • Oct 15 20:42
    gautierhattenberger closed #2602
  • Oct 15 20:04
    hendrixgr synchronize #2602
  • Oct 15 18:59
    hendrixgr commented #2602
  • Oct 15 18:29
    OpenUAS commented #2602
  • Oct 15 18:27
    OpenUAS commented #2602
  • Oct 15 18:21
    OpenUAS commented #2602
  • Oct 15 18:21
    OpenUAS commented #2602
  • Oct 15 18:20
    OpenUAS commented #2602
  • Oct 15 18:18
    OpenUAS commented #2602
  • Oct 15 17:41
    OpenUAS milestoned #2600
  • Oct 15 17:41
    OpenUAS labeled #2600
  • Oct 15 17:41
    OpenUAS labeled #2600
  • Oct 15 17:41
    OpenUAS labeled #2600
  • Oct 15 17:41
    OpenUAS labeled #2600
Hector Garcia de Marina
@noether
is it possible that my script is not taking/importing the right IvyMessagesInterface ?
ahh I see, it complains because the ivy.py that is executed is in /paparazzi/var/lib/blabla
I do not know whether to define the paths like this https://github.com/paparazzi/paparazzi/blob/master/sw/ground_segment/python/gvf/gvfframe.py#L14 is still okei
Hector Garcia de Marina
@noether
anyways, regardless of that (that I would like to know for testing in the future other things xD). I just copied the ivy.py with the fix in the /var/lib
the fix works, the error is gone., thanks :P
Gautier Hattenberger
@gautierhattenberger
it is the make that does the copy in var/lib/python, but it is also checking out the correct submodule version, so that would discard your manual checkout unless you do a commit
maybe running make pprzlink_protocol is enough to regenerate messages and lib and it does not change the submodule revision
hum, to bad, to update the lib it is make libpprzlink and it starts with a submodule update
maybe we could split this to only get the lib from current working directory
Hector Garcia de Marina
@noether
I see, it does not sound very clean for now xD. Thanks for the explanation
ddou210
@ddou210

Hey everybody,
I'm trying to communicate with paparazzi (ivy) using ROS. My goal is to receive NAVdata and send attitude and thrust commands to an AR.Drone 2.0 using ROS cmd_vel instead of a RC, while also reading sensors information. There's any guide available on how to achieve this? I followed the one available at http://wiki.paparazziuav.org/wiki/Pprzros to create a pprzros node but I received the message "PprzMessageError: Error: Msg ROTORCRAFT_STATUS has 12 fields, tried to set 13 values" (in another try I received ENERGY has 4 fields, tried to set 6 values). I'm using "ARDrone2_optitrack" airframe, but the error persists with other airframe options. I also tried to communicate using a Bebop2 and "bebop 2 22" airframe, and the same error occurs.

The nodes /pprzros/to_ros and /from_ros are created, but they do not send or receive any message. Any clue or tutorial on how can I achieve this? Thanks in advance!

Gautier Hattenberger
@gautierhattenberger
@ddou210 Hello. This tool is using by default a specific version of the PPRZLINK library provided by a git submodule. This version is completely outdated compared to the master code of paparazzi. It seems that it is even using the version 1 of this protocol, which is no longer used (default is v2).
The first thing to try would be to update this submodule and change the paths to point to v2 in the code (files in pprzros/src/pprzros/ directory).
This code is unfortunately not much used and should be improved to used the correct library, eventually directly the one installed by Paparazzi main code itself.
Gautier Hattenberger
@gautierhattenberger
@ddou210 I just made a new branch (and a pull request enacuavlab/pprzros#2) for an updated version of pprzros.
It is now using the latest version of pprzlink, with protocol v2 by default. It should also load the Paparazzi lib instead of the submodule if PAPARAZZI_HOME is defined
I don't have ROS on my computer at the moment to test it, so feedback on this is very welcome
ddou210
@ddou210
@gautierhattenberger Many thanks for your effort, and sorry for the late response! I was unable to test it until today.
The update version worked, so I can read from the ARDrone telemetry using ivy and ROS.
Now I'm figuring out a way to send the attitude and thrust references to the drone via ROS. Do you suggest a way on how this can be done? I'm reading the paparazzi docs to better understand the system and do the job. Thanks again!
Gautier Hattenberger
@gautierhattenberger
@ddou210 glad to hear that it is working again. I'll probably add some more changes before merging, like compatibility with Python3, but thanks for testing already
One way to control attitude and thrust is to send the RC_4CH message with the radio control type datalink, so basically taking the place of the safety RC.
If you want to keep the real RC, another way is to send JOYSTICK_RAW message and use the joystick module with a flight plan like this: https://github.com/paparazzi/paparazzi/blob/master/conf/flight_plans/rotorcraft_joystick_enac.xml
It is not as easy to understand, but basically, if you go the joystick block in NAV mode, you give control to your external joystick / ROS module
8724970
@8724970

Hi, I cannot get paparazzi working on my AR2 drone. This is the error message I get. Anybody has some suggestions? CC version:
arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2012.03-57) 4.6.3

/home/pc20/paparazzi/var/aircrafts/ardrone2/ap/modules/computer_vision/lib/vision/image.o: In function image_create': /home/pc20/paparazzi/sw/airborne/modules/computer_vision/lib/vision/image.c:62: undefined reference toaligned_alloc'
collect2: ld returned 1 exit status
make[1]: [/home/pc20/paparazzi/conf/Makefile.linux:112: /home/pc20/paparazzi/var/aircrafts/ardrone2/ap/ap.elf] Error 1
make[1]: Leaving directory '/home/pc20/paparazzi/sw/airborne'
make:
[Makefile.ac:310: ap.compile] Error 2
make: Leaving directory '/home/pc20/paparazzi'

FAILED 'make -C /home/pc20/paparazzi -f Makefile.ac AIRCRAFT=ardrone2 ap.compile' with code 2

Gautier Hattenberger
@gautierhattenberger
the image.c code have been updated last year for the bebop 1 & 2, but was not tested on Ardrone. The parrot toolchain from 2012 is too old and doesn't have this function in the libc.
the first thing to try is to use the 2016 toolchain that may work for the ardrone 2: https://firmware.parrot.com/Toolchains/parrot-tools-linuxgnutools-2016.02-linaro_1.0.0-5_amd64.deb
iAbdur18
@iAbdur18
hi, for a research project I am using Paprazzi and relatively new to this, let me know if anyone can guide me to the things to avoid
Gautier Hattenberger
@gautierhattenberger
@iAbdur18 Hello. Can you tell a bit more about your project ?
We have a new beginner documentation (still in construction) in addition to the wiki: https://paparazzi-uav.readthedocs.io/en/latest/
iAbdur18
@iAbdur18
@gautierhattenberger hey, so basicly my supervisor has initially asked me to go through the entire Paprazzi Guidlines and Install the basics softwares. Our ultimate task would to work mount a camera on a 3D design drone and use it to capture images
8724970
@8724970
Hi all, I have a similar situation as iAbdur18. I am also new. Trying to get Paparazzi working on the Parrot AR2. @gautierhattenberger is a giving great advice. Is there anyone else currently working on AR2 Paparazzi configuration?
Gautier Hattenberger
@gautierhattenberger
@iAbdur18 You can start with the wiki instructions for installation (http://wiki.paparazziuav.org/wiki/Installation), or as I said, you can try the new documentation that we are setting up : https://paparazzi-uav.readthedocs.io/en/latest/
The second one is still very short, but the "Quick Start" guide should be good enough already, and all feedback to improve it are welcome
@8724970 I still have some ARDrone2 at work, but we don't use it anymore as the batteries are almost dead (and the drones too...), we are now using Bebop2 or custom airframes. Do you have any issues with the ARDrone ?
8724970
@8724970
Hi @gautierhattenberger I am in the initial phase of setting up a course on IT and Drones. We are currently programming drones with Python but I figured a good next step is to work with Paparazzi. In class, I need at least one drone for 3 students and seconde hand AR2 drones are both cheap and available (i have four already), so that's my choice for now. After proving the success of the course, I will get more budget and work with Bebop or Custom. Unfortunate I can't seem to get the ap.elf working for AR2 ( i have already followed your earlier suggestions but get stuck with image.c code and the new bebop toolchain also gives errors). If someone has a working ap.elf file it would be very useful. From then onwards I can continue to learn (and maybe recreate the working ap.elf). I am documenting my experiences and i need to create teaching materials. That i can make available for others to learn from. I you have a working ap.elf for AR2, I would be very grateful.
ddou210
@ddou210
@gautierhattenberger your suggestion of using RC_4CH to send attitude and thrust commands worked, thank you. I noticed that RC_4CH messages use int8 instead of int16. Since the servos operate at signals from -9600 to 9600, do I'm losing performance controlling the drone via ROS at 8 bits? If so, can I change the bit precision of RC_4CH without mess the pprz?
Gautier Hattenberger
@gautierhattenberger
@ddou210 It is true that you are loosing precision. The reason was that this message was designed for RF modems with low bandwidth a long time ago, so we wanted to keep it small. It will not be enough to change the types in the message. You also need to change the types and the scaling in sw/airborne/subsystems/radio_control/rc_datalink.c.
@8724970 If I found some time, I may try to flash an ARDrone2 and see if it works.
What you can try is to log on the drone with telnet, then start the ap.elf by hand from here. If it is crashing, maybe you'll get additional info from the terminal output.
8724970
@8724970

Hi @gautierhattenberger Thank you for your help. Hopefully you find the time to send a working ap.elf file. I have tried to arm-2012.03 (for AR2) but get error related to image.o and image.c I also followed the suggestion to try the arm-2016.02-linaro but get error about stubs-soft.h: No such file. These are my error messages:arm-2016.02-linaro
CC /home/pc20/paparazzi/var/aircrafts/ardrone2/ap/boards/ardrone/board.o
Using CC = /opt/arm-2016.02-linaro/bin/arm-linux-gnueabihf-gcc
CC /home/pc20/paparazzi/var/aircrafts/ardrone2/ap/mcu.o
GCC version:
CC /home/pc20/paparazzi/var/aircrafts/ardrone2/ap/arch/linux/mcu_arch.o
arm-linux-gnueabihf-gcc (Linaro GCC 4.9-2016.02) 4.9.4 20151028 (prerelease)

CC /home/pc20/paparazzi/var/aircrafts/ardrone2/ap/mcu_periph/sys_time.o
In file included from /opt/arm-2016.02-linaro/arm-linux-gnueabihf/libc/usr/include/features.h:402:0,
from /opt/arm-2016.02-linaro/arm-linux-gnueabihf/libc/usr/include/inttypes.h:25,
from /home/pc20/paparazzi/sw/airborne/mcu_periph/sys_time.h:33,
from mcu_periph/sys_time.c:30:
/opt/arm-2016.02-linaro/arm-linux-gnueabihf/libc/usr/include/gnu/stubs.h:7:29: fatal error: gnu/stubs-soft.h: No such file or directory

include <gnu/stubs-soft.h>

arm-2012.03
arm-none-linux-gnueabi-gcc (Sourcery CodeBench Lite 2012.03-57) 4.6.3
/home/pc20/paparazzi/var/aircrafts/ardrone2/ap/modules/computer_vision/lib/vision/image.o: In function image_create': /home/pc20/paparazzi/sw/airborne/modules/computer_vision/lib/vision/image.c:62: undefined reference toaligned_alloc'
collect2: ld returned 1 exit status
make[1]: [/home/pc20/paparazzi/conf/Makefile.linux:112: /home/pc20/paparazzi/var/aircrafts/ardrone2/ap/ap.elf] Error 1
make[1]: Leaving directory '/home/pc20/paparazzi/sw/airborne'
make:
[Makefile.ac:310: ap.compile] Error 2
make: Leaving directory '/home/pc20/paparazzi'

FAILED 'make -C /home/pc20/paparazzi -f Makefile.ac AIRCRAFT=ardrone2 ap.upload' with code 2

Gautier Hattenberger
@gautierhattenberger
@8724970 sorry, but it seems that ardrone really can't use the 2016 toolchain and that the only way is to fix the code
you can check this pull request: paparazzi/paparazzi#2598
I can't test it now, but it is just "reverting" the modification on this file to use a standard alloc like it was before when the glibc is too old
please report here or on github if it is working or not
8724970
@8724970

Hi @gautierhattenberger. The suggested change seems to have a positive effect. Thanks!!. I do still get an error, but it also says: #pragma message: Succesfully started "ap.elf" on Ardrone 2 (i will further investigate this in the weekend). The error message is as such: Parrot version: 0.0.0.0
Traceback (most recent call last):
File "/home/pc20/paparazzi/sw/tools/parrot/ardrone2.py", line 345, in <module>
ardrone2.parse_args()
File "/home/pc20/paparazzi/sw/tools/parrot/parrot_utils.py", line 359, in parse_args
self.status()
File "/home/pc20/paparazzi/sw/tools/parrot/parrot_utils.py", line 225, in status
self.uav_status()
File "/home/pc20/paparazzi/sw/tools/parrot/ardrone2.py", line 58, in uav_status
' (' + self.read_from_config('static_ip_address_base') +
File "/home/pc20/paparazzi/sw/tools/parrot/ardrone2.py", line 42, in read_from_config
search = re.search(name + '[^=]+=\r\n\t ',self.config_content)
File "/usr/lib/python3.8/re.py", line 199, in search
return _compile(pattern, flags).search(string)
TypeError: cannot use a string pattern on a bytes-like object
make[1]: [/home/pc20/paparazzi/conf/Makefile.ardrone2:33: upload] Error 1
make[1]: Leaving directory '/home/pc20/paparazzi/sw/airborne'
make:
[Makefile.ac:313: ap.upload] Error 2
make: Leaving directory '/home/pc20/paparazzi'

FAILED 'make -C /home/pc20/paparazzi -f Makefile.ac AIRCRAFT=ardrone2 ap.upload' with code 2

Horace
@ElizHorace_twitter
hi, i am using paparrazi on bebop 2. may i know what sensor information will be used if i read stateGetSpeedEnu_f()->z ? is it a fusion output of accelerometer and sonar/baro? or something else? thank you.
Gautier Hattenberger
@gautierhattenberger
@8724970 it seems like a Python2 / Python3 issue where string and bytes are not the same type of object anymore. You can search this way or try to force using python2. I'll have a look later
@ElizHorace_twitter the information from stateInterface is the output of the INS/AHRS filters, so if you have a "standard" config, this will be the fusion of accel / baro.
ddou210
@ddou210
@gautierhattenberger Hi again! I followed your suggestions about changing message types and scaling to use RC_4CH as 16 bits. Simply changing the message.xml in pprzlink and the types in rc_datalink.c/.h didn't work. The messages still in 8 bits (by the way, I'm using ivyprobe '(. RC_4CH .)' to check the message type, is it ok? I mean, the message read in ivyprobe is what is sent to the control loops?).
Do you have any suggestions about what is holding the RC_4CH commands in int8? Do I need to change any definitions in datalink files? My concern is because I saw this warning in messages.xml joystick section "Standard joystick axis values are on 16 bits signed integers, but tools like 'input2ivy' may scale them on int8 type."
Gautier Hattenberger
@gautierhattenberger
@ddou210 good point, the tool input2ivy is actually scaling the axis values to 8bit. It is a bit more work to change it as it is completely hardcoded for now. You can either try to change it by hand and see if it works, or write your own tool (like in python instead of C/Ocaml) just to send the RC_4CH message (input2ivy is complex because it is very generic).
Eventually, you can open an issue for that in Github, so we don't forget about it.
Gautier Hattenberger
@gautierhattenberger
@8724970 you can try this modification to fix the upload issue
diff --git a/sw/tools/parrot/parrot_utils.py b/sw/tools/parrot/parrot_utils.py
index d092582db..3c6b56024 100644
--- a/sw/tools/parrot/parrot_utils.py
+++ b/sw/tools/parrot/parrot_utils.py
@@ -131,7 +131,7 @@ class ParrotUtils:
             s = s[len(command) + 2:-12]
         else:
             s = s[len(command) + 2:-4]
-        return s
+        return s.decode('utf-8')

     # Upload ftp and catch memory-full error
     def upload(self, filename, content):
ddou210
@ddou210
@gautierhattenberger thanks by your feedback! I'll try to make a tool in python to send the RC_4CH messages as int16. Is there any example of how such a tool can be done?
I took a look at the files and didn't figured out a way to send the messages, i.e., how to configure an output to be read into paparazzi, and how to include this reading in the pprz session that is running.
Thanks again for your help! I'll keep trying.
Gautier Hattenberger
@gautierhattenberger
@ddou210 If you have already modified the types in RC_4CH message and the reception on the autopilot side, their is no problem to send commands with 16 bit scaling from ROS.
The issue with input2ivy is only if you what to use this tool to control from a joystick, without ROS. But if your control is coming from ROS, just pack a PprzMsg in a ROS message and pprzros should translate it to Ivy correctly.
ddou210
@ddou210
@gautierhattenberger I modified the types in RC_4CH message, the reception on both sides, and the ROS is sending the 16bit message as two uint8 bits. However, I cannot parse correctly in pprz. For example, the message from ros [5000,0,0,0,0] (roll, pitch,yaw,throttle,mode), when I execute ivyprobe '(. RC_4CH .)' it reads pprzros sent 'datalink RC_4CH 48 0 0 5000 0 0 ' (for ac_id, mode, throttle, roll, pitch, yaw) and echo from /pprzros/from_ros reads: data: [48, 0, 0, 0, 136, 19, 0, 0, 0, 0] (as 1 byte for ac_id, mode, and 2 uint8 bytes for throttle, roll, pitch,yaw). In pprz telemetry ppm, the values that it is showing is just the third to the sixth byte from data, ignoring the rest. So, for this example, ppm shows [0,136,19,0]. Because of that I believe is a parse problem. Do you know in which file this parse is done? Thanks in advance!
Gautier Hattenberger
@gautierhattenberger
@ddou210 I think it would be easier if you could share your branch somewhere so I can review the changes you have made already.
From what I can see, I goes well on the ground side, so either the message is truncated when sending, or wrongly parsed upon reception. Since you use ARDrone, you can do debug with printf if needed. You'll just need to start or restart the autopilot by hand from the telnet console.
Sagartoke510
@Sagartoke510
Hi can anyone tell me how can we sky-write character using the paparazzi flight plans?
Gautier Hattenberger
@gautierhattenberger
@Sagartoke510 what do you plan to write ? is it with a plane or a multicopter ?
Sagartoke510
@Sagartoke510
airdrone
Initials like SATO
@gautierhattenberger I'm using simulation as of now ... its with aridrone2 .....I want to sky-write intials like SATO
Gautier Hattenberger
@gautierhattenberger
then, the easiest is probably to make waypoints and use the path instruction for the A and T. Use a circle for the O. The S is more complex to make it with circles, but using several waypoints should be good enough.
I also suggest to reduce the maximum flight speed to avoid overshoot.
ddou210
@ddou210
@gautierhattenberger Thank you again for your attention. I believe it is a parse problem. My branch can be found at https://github.com/ddou210/paparazzi/tree/pprzros_RC
Gautier Hattenberger
@gautierhattenberger
@ddou210 your changes on the C code should be fine, but I have some doubts about the message definition itself. How and where did you change the type in the message RC_4CH in pprzlink ?
You should check the file var/include/pprzlink/datalink/RC_4CH.h to be sure that it is parsing 16bits values and not 8bits.
Chris
@chris-djong

@chris-djong changing the wind in simulation is achieved with the WORLD_ENV and WORLD_ENV_REQ ground message (http://docs.paparazziuav.org/latest/paparazzi_messages.html#WORLD_ENV), so you need a ground agent connected to the Ivy bus.
Here is an example : https://github.com/paparazzi/paparazzi/blob/master/sw/simulator/mesonh/mesonh.py
The idea is that you subscribe to the WORLD_ENV_REQ that is sent by the simulator requesting the wind at the specified position. Then you answer with WORLD_ENV message, which contains the wind information (and a few other fields)

@gautierhattenberger I tried to implement the ground agent inspired on mesonh.py example. In my example the world_env_cb is executed successfully each second and the WORLD_ENV message is send (as seen in paparazzi Messages tool), but unfortunately the drone is not reacting to any changes in the normal SIM environment. Increasing the wind speed of the ground agent to 50 m/s, for example, will not change anything in the simulation itself.

As soon as I enable gaia, however, the drone keeps reacting to the wind changes of the gaia WORLD_ENV message, but as soon as a callback of my agent is received the wind returns to 0, until gaia sends the next WORLD_ENV message.

Do you have an idea what I might be missing? Here is a copy of the ground agent that I use as well: https://github.com/chris-djong/paparazzi/blob/neverlandingdrone/sw/ground_segment/python/wind_generator/wind_generator.py

Gautier Hattenberger
@gautierhattenberger
@chris-djong The normal sim target is only reacting to the "request" format (so sim sends WORLD_ENV_REQ and someone may reply a valid WOLRD_ENV see http://wiki.paparazziuav.org/wiki/DevGuide/Server_GCS_com#Advanced_request_mechanism).
The nps simulator can react to both request format and direct messages (that was needed on some projects where we don't want to rely on the request frequency of the simulator).
So you can either try to fly with NPS, or implement the request mechanism (the latest PPRZLINK API for python does that, but mesonh example was too old)
Chris
@chris-djong
Okay, thank you! I will try to implement it like that then.