Bug #375
closed[question] how to downgrade this package
Description
Hi Anthony,
It might not be the right place to post this question, but I did not know where else it can go.
When I try to connect, I started getting this error from rotorcraft-genom3 after updating from version 3.1 to 3.3:
'hardware device version `1'' too old, version `1.1'' or newer is required'so I have two questions:
- A temporary solution would be to downgrade the rotorcraft-genom3 component back to version 3.1, how can I do that?
- Is this a problem of the firmware version on the Paparazzi Chimera board being too old, or the hardware itself?
Updated by Anthony Mallet almost 2 years ago
- Status changed from New to Feedback
Indeed, the rotorcraft-genom3 component is reporting that the
paparazzi firmware is too old. You need at least version 1.1, and
nowadays the version is rather 1.2. The easiest for you would be to
upgrade the firmware.
Regarding reverting rotorcraft to an older versions, it mostly depends
on how you installed it.
- From source, you can download the 3.3 tarball from here
`https://git.openrobots.org/news/258`
- From apt, just add =3.3 to the package name, e.g.
`apt install robotpkg-rotorcraft-genom3+codels+openprs+pocolibs-client-c+pocolibs-server=3.3`
- From robotpkg, you have to checkout an older robotpkg tree that
contains this version, e.g.
`cd robotpkg/robots/rotorcraft-genom3 && git checkout f1f9fef && make update`
But I would not recommend this, as you will be stuck in the future and
missing new features.
Updated by Ayham Alharbat almost 2 years ago
Thanks Anthony for the quick reply!
I agree that we need to upgrade the firmware, but since I have never done it before, can you guide me through the process? I just got this tutorial from my colleagues, and I am not sure if it is clear enough for me.
update about this point:
Ayham Alharbat wrote:
- A temporary solution would be to downgrade the rotorcraft-genom3 component back to version 3.1, how can I do that?
With the help of Gianluca Corsini I tried doing the following:
# in robotpkg_path/robotpkg/robots/rotorcraft-genom make checkout cd work.Name/rotorcraft-genom3-3.3/ git checkout rotorcraft-genom3-3.1 cd ../.. make update .
Here is the terminal output:
===> Updating for rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server => Building package update list Scanned 5 packages ===> Rebuilding for rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server ===> Deinstalling for rotorcraft-genom3 robotpkg_delete: Couldn't remove /home/ayham/ut/openrobots/lib/genom/pocolibs/plugins/rotorcraft-3.1.so robotpkg_delete: Couldn't remove /home/ayham/ut/openrobots/lib/genom/pocolibs/librotorcraft-c-client-3.1.so Removed rotorcraft-genom3-3.3pl0117172219~codels+pocolibs-client-c+pocolibs-server ===> Rebuilding for rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server ===> Reinstalling for rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server libtool: warning: relinking 'rotorcraft.la' => Adding run-time search paths to pkg-config files => Registering installation for rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server Added genom3-pocolibs-1.21 to the requirements of rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server Added genom3-2.99.40 to the requirements of rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server Added openrobots2-idl-2.2 to the requirements of rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server Added pocolibs-3.1 to the requirements of rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server ===> Done install for rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server ===> Done update for rotorcraft-genom3-3.3pl0117172523~codels+pocolibs-client-c+pocolibs-server make: Nothing to be done for '.'.
Now: I can connect to the robot successfully, where I see in the terminal:
rotorcraft-pocolibs: connected to chimera1.0, /dev/ttyACM1
but I cannot get any data to/from the robot. For example in Matlab:
- rotorcraft.get_sensor_rate().result.measured_rate return zeros
- rotorcraft.get_battery().result.battery.level also returns zero
Is it possible that I need to downgrade other component(s) to make this work?
Updated by Anthony Mallet almost 2 years ago
On Tuesday 17 Jan 2023, at 17:56, Ayham Alharbat wrote:
I agree that we need to upgrade the firmware, but since I have never
done it before, can you guide me through the process? I just got
this tutorial from my colleagues, and I am not sure if it is clear
enough for me.
That tutorial seems obfuscated to me.
You just need to install tk3-paparazzi-1.2, e.g. from robotpkg in
hardware/tk3-paparazzi and tk3-flash in sysutils/tk3-flash.
Then, `tk3-flash flash chimera-N.0 <prefix>/lib/tk3-firmware/chimera`
where N is the chimera id of your board and <prefix> where you
installed stuff.
1 A temporary solution would be to downgrade the rotorcraft-genom3
component back to version 3.1, how can I do that?With the help of Gianluca Corsini I tried doing the following:
- in robotpkg_path/robotpkg/robots/rotorcraft-genom make checkout cd
work.Name/rotorcraft-genom3-3.3/ git checkout rotorcraft-genom3-3.1
cd ../.. make update .
Why don't you try one the methods that I suggested? What you did will
typically create some issues in your setup. The checkout command is
not meant to downgrade packages ...
Updated by Ayham Alharbat almost 2 years ago
Thanks Anthony! I will try to update the firmware then.
But is there a way to know/retrieve the ID of the board?
Anthony Mallet wrote in #note-4:
where N is the chimera id of your board and <prefix> where you
installed stuff.
Updated by Anthony Mallet almost 2 years ago
On Tuesday 17 Jan 2023, at 18:53, Ayham Alharbat wrote:
But is there a way to know/retrieve the ID of the board?
The ID is normally printed on a label on the board. You also have it
in the kernel logs (dmesg) when you plug it. Something like:
[242628.082141] usb 1-2: Product: tk3-paparazzi
[242628.082144] usb 1-2: Manufacturer: LAAS/CNRS
[242628.082146] usb 1-2: SerialNumber: chimera-6
You can also use the tty device directly, e.g. /dev/ttyACM0
Updated by Ayham Alharbat almost 2 years ago
It worked!
For reference, this is what I did, after connecting the board to PC with USB:
tk3-flash flash /dev/ttyACM0 ~/ut/openrobots/lib/tk3-firmware/chimera
output:
Please power on or reset the device.... Probed STM32 bootloader STM32F76xxx/77xxx bootloader version 9.3 Retrieving load data from /home/ayham/ut/openrobots/lib/tk3-firmware/chimera Found data segment 0, paddr 0x8010000-0x80101ff, 512 bytes Found data segment 1, paddr 0x8010200-0x8016f13, 27924 bytes Found data segment 2, paddr 0x8016f14-0x80175b7, 1700 bytes Found settings segment 3, paddr 0x8008000-0x80080bb, 188 bytes Preserving settings in 0x8008000-0x80080bb Reading data from 0x8008000-0x80080bb, 188 bytes tk3-flash: outdated settings data, please flash with option -i or -u
so I did:
tk3-flash -u flash /dev/ttyACM0 ~/<path>/openrobots/lib/tk3-firmware/chimera
output:
Please power on or reset the device... Probed STM32 bootloader STM32F76xxx/77xxx bootloader version 9.3 Retrieving load data from <path>/openrobots/lib/tk3-firmware/chimera Found data segment 0, paddr 0x8010000-0x80101ff, 512 bytes Found data segment 1, paddr 0x8010200-0x8016f13, 27924 bytes Found data segment 2, paddr 0x8016f14-0x80175b7, 1700 bytes Found settings segment 3, paddr 0x8008000-0x80080bb, 188 bytes Searching for existing settings Reading data from 0x8000000-0x8000003, 4 bytes Reading data from 0x8008000-0x8008003, 4 bytes Reading data from 0x8008000-0x800ffff, 32768 bytes Found settings data at 0x8008000-0x8008093, 148 bytes Updating settings in 0x8008000-0x80080bb Erasing flash page 1. Erasing flash page 2. Writing data to 0x8010000-0x80175b7, 30136 bytes Writing data to 0x8008000-0x80080bb, 188 bytes --- Settings -------------------------------------- serial : chimera-12.0 boot-timeout : 5 (bootloader timeout (s)) boot-addr : 132 (boot address (muliple of 16kB)) boot-lock : 0 (set to 1234567890 to update bootloader) motors : 6 (number of controlled motors)
I upgraded rotorcraft to 3.4, and then tried to connect again, and it works!
For testing, I can get the sensor rate, but, not all of the data is there, as in:
>> rotorcraft.get_sensor_rate().result.measured_rate ans = struct with fields: imu: 452.1847 mag: 0.9900 motor: 0 battery: 0
and when trying to do:
>> rotorcraft.get_battery().result.battery.level ans = 0×1 empty cell array
I am using MATLAB 2019b, and here are my robotpkg_info:
nhfc-genom3-2.2~codels+pocolibs-client-c+pocolibs-server Near-hovering flight controller for rotorcrafts pom-genom3-3.4~codels+pocolibs-client-c+pocolibs-server State estimation combining multiple independent sources tk3-paparazzi-1.2 Autopilot for the Paparazzi hardware tcl-genomix-1.8 Interactive genomix TCL client for controlling GenoM3 components genom3-2.99.40 Software components generator for robotics architecture. genomix-1.7.2 HTTP server for controlling GenoM3 components pkg_install-20110805.12 Package management and administration tools for robotpkg mrsim-gazebo-1.2 Gazebo simulator plugin for tk3-mikrokopter multi-rotors eltclsh-1.18 Interactive shell for the TCL programming language. optitrack-gazebo-1.0 Gazebo simulator plugin for OptiTrack Motion Capture libedit-3.1r20160903 Generic line editing and history functions. tnftp-20151004~ssl The enhanced FTP client in NetBSD tk3-mikrokopter-1.8.5 Autopilot for the Mikrokopter hardware joystick-genom3-1.0~codels+pocolibs-client-c+pocolibs-server Export joystick readings mrsim-genom3-2.1.1~codels+pocolibs-client-c+pocolibs-server Simulator for tk3-mikrokopter based quadrotors optitrack-genom3-2.3~codels+pocolibs-client-c+pocolibs-server Export motion capture data from an Optitrack system tk3-flash-1.4 Programming utility for Mikrokopter hardware libmrsim-1.3 Simulator library for tk3-mikrokopter based quadrotors arduio-genom3-1.3~codels+pocolibs-client-c+pocolibs-server Control an Arduino board running the arduio software maneuver-genom3-2.1~codels+pocolibs-client-c+pocolibs-server Simple maneuver planner for aerial robots rotorcraft-genom3-3.4r1~codels+pocolibs-client-c+pocolibs-server Low level controller for tk3 quadrotors genom3-pocolibs-1.21 GenoM3 template for pocolibs-based components digest-20080510 Message digest wrapper utility openrobots-idl-1.6 Common IDL interfaces for genom3 components pocolibs-3.1 Real-time communication library used by GenoM modules. matlab-genomix-1.9 matlab client for controlling GenoM3 components with genomix libkdtp-1.3 Spline-based Kinodynamic Trajectory Planner openrobots2-idl-2.2 Common IDL interfaces for genom3 components
Another question:
Do I have to worry about the 'outdated settings data', I know that -u preserved the old settings to the new firmware, but do I need to set some of the new settings?
Thanks again, I really appreciate your help!
Updated by Ayham Alharbat almost 2 years ago
Also, rotorcraft.start() gets stuck in MATLAB and does not return.
Updated by Anthony Mallet almost 2 years ago
On Tuesday 17 Jan 2023, at 19:44, Ayham Alharbat wrote:
For testing, I can get the sensor rate, but, not all of the data is
there, as in:rotorcraft.get_sensor_rate().result.measured_rate
imu: 452.1847
mag: 0.9900
motor: 0
battery: 0
That's a totally different issue.
imu and mag number seem odd. What are you asking for, regarding sensor
rates? What is the output from rotorcraft?
Updated by Ayham Alharbat almost 2 years ago
Anthony Mallet wrote in #note-9:
What are you asking for, regarding sensor rates? What is the output from rotorcraft?
I did not fully understand your question, but let's say that before doing get_sensor_rate I do set_sensor_rate of the following values:
s_rate_imu = 1000;
s_rate_mag = 1;
s_rate_motor = 100;
s_rate_battery = 1;
And when I get_sensor_rate this is the output:
imu: 452.1847
mag: 0.9900
motor: 0
battery: 0
Updated by Anthony Mallet almost 2 years ago
On Wednesday 18 Jan 2023, at 15:30, Ayham Alharbat wrote:
s_rate_imu = 1000; s_rate_mag = 1; s_rate_motor = 100;
s_rate_battery = 1;
OK, I was surprised by the 1Hz magnetometer, as this is a bit useless,
but at least this matches.
And what are the messages printed by rotorcraft after you connect?
So the main issue seems the motor data. Are the motor powered? What
can you see on the 7 segments display of the paparazzi?
Updated by Ayham Alharbat almost 2 years ago
Anthony Mallet wrote in #note-11:
And what are the messages printed by rotorcraft after you connect?
rotorcraft-pocolibs: connected to chimera1.2, /dev/ttyACM1
Are the motor powered?
Yes, and the ESCs make the startup tones.
What can you see on the 7 segments display of the paparazzi?
'0'
Updated by Anthony Mallet almost 2 years ago
On Wednesday 18 Jan 2023, at 19:28, Ayham Alharbat wrote:
And what are the messages printed by rotorcraft after you connect?
rotorcraft-pocolibs: connected to chimera1.2, /dev/ttyACM1
If it prints just that, it might be that you are connected to the
auxiliary tty of the chimera. You should connect to the main tty,
i.e. endpoint 0, probably /dev/ttyACM0 if you don't have other serial
devices connected. Or just use the serial id of the board (chimera-N).
What can you see on the 7 segments display of the paparazzi?
'0'
OK, this means that the chimera sees 6 motors, so you should be fine.
Updated by Ayham Alharbat almost 2 years ago
Anthony Mallet wrote in #note-13:
If it prints just that, it might be that you are connected to the
auxiliary tty of the chimera. You should connect to the main tty,
i.e. endpoint 0, probably /dev/ttyACM0 if you don't have other serial
devices connected. Or just use the serial id of the board (chimera-N).
That was exactly the problem! Now I can connect to it as usual and I was able to fly it with no problems.
What can you see on the 7 segments display of the paparazzi?
'0'
OK, this means that the chimera sees 6 motors, so you should be fine.
Out of curiosity, I have a question, what does the output of the 7 segments display represent? is there a table that I can refer to in case of future problems?
Many thanks, Anthony for helping me fix this issue! I will try to compile what I learned from you here into some sort of documentation that can be shared with the team.
Updated by Anthony Mallet almost 2 years ago
- Status changed from Feedback to Closed
That was exactly the problem! Now I can connect to it as usual and I
was able to fly it with no problems.
OK, cool. I'm closing this, then.
Out of curiosity, I have a question, what does the output of the 7
segments display represent? is there a table that I can refer to in
case of future problems?
Each segment on the border represent a motor data packet, up to 6
motors. For instance, for an hexarotor it will show a blinking 0 and
for a quadrotor a blinking || (depending on the motor data frequency
you may of course not see it's blinking). The segment in the middle
(-) represents a data packet sent from the chimera to the motors. The
dot (.) represents data from the onboard IMU/mag.