Skip to content

Conversation

@MartinLocker
Copy link
Collaborator

New feature imu, analog servo, neopixel leds added to esp32 fw.

@m3d
Copy link
Member

m3d commented Aug 5, 2025

This one is pretty big one :). Thanks a lot for sharing!

accScale = 1000.0f / (1<<11);
break;
default:
range = Qmi8658AccRange_8g;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not know why _8g has negative sign, but I guess the same should be for default?

@m3d
Copy link
Member

m3d commented Aug 5, 2025

have you modified also esp/common/config.h? I am not sure if you have there default config for M01? Could you please also increase
#define ROBOT_FW_VERSION 6 // please increase with every change of Robot project (or common library)
(this is old one), as the protocol changed? Thanks a lot

@m3d
Copy link
Member

m3d commented Aug 8, 2025

I have some compilation errors like:

src/main.cpp: In function 'void receiveCommand()':
src/main.cpp:65:25: error: 'class Robot' has no member named 'led'; did you mean 'read'?
                   robot.led(0, COLOR::GREEN);
                         ^~~
                         read
src/main.cpp:65:32: error: 'COLOR' has not been declared
                   robot.led(0, COLOR::GREEN);
                                ^~~~~

@m3d
Copy link
Member

m3d commented Aug 8, 2025

it looks like we are hitting Windows/Linux filenames with case sensitivity :(

#include "I2C.h"
          ^~~~~~~
compilation terminated.

@m3d
Copy link
Member

m3d commented Aug 8, 2025

OK, now it compiles and I was able to flash M03 (for some reason M02 is not visible on my PC :( ... maybe the USB connector is bit loose after FRE2025?) ... I tried go 1m, and as expected it needs update on OSGAR side:

(osgar) md@md-ThinkPad-P50:~/git/osgar$ python -m osgar.record config/matty-go.json --note "matty M03 na krabici, FW ver8" 
2025-08-08 13:57:30,821 root             WARNING  Environment variable OSGAR_LOGS is not set - using working directory
2025-08-08 13:57:30,821 __main__         INFO     /home/md/git/osgar/matty-go-250808_115730.log
2025-08-08 13:57:30,827 __main__         INFO     SIGINT handler installed
FW version: M03-8
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/home/md/git/osgar/osgar/node.py", line 44, in run
    self.update()
  File "/home/md/git/osgar/osgar/node.py", line 36, in update
    handler(data)
  File "/home/md/git/osgar/osgar/platforms/matty.py", line 217, in on_esp_data
    self.process_msg(msg)
  File "/home/md/git/osgar/osgar/platforms/matty.py", line 202, in process_msg
    self.process_esp_packet(packet)
  File "/home/md/git/osgar/osgar/platforms/matty.py", line 186, in process_esp_packet
    assert 0, packet.hex()
AssertionError: 01490002982b0000fcff9e00cbff47ff65ff4fff94fe3d00a3d5

so far so good :), thanks

V ... version

C uint16_t ... analogové servo na pinu GPIO4 (šířka pulzu 1000 ... 2000 us)
X uint16_t index, uint16_t position ... digitální ST servo na sběrnici (adresa 4 ... ), pozice (0..4095)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was not aware that this change is also available now!

@m3d
Copy link
Member

m3d commented Aug 8, 2025

Currently testing in robotika/osgar#1028

@MartinLocker
Copy link
Collaborator Author

Add fw for imu calibration

Copy link
Member

@m3d m3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot, feel free to merge. Calibration for M02 and M03 is so far just "preliminary", but we can have smaller PR later with updates/fixes.

@m3d
Copy link
Member

m3d commented Sep 5, 2025

Hello,
can we merge this PR? So far it looks as everything is working and potential smaller fixes can be merged later separately. I am asking for this because in parallel I have opened https://github.com/robotika/matty/tree/feature/odroid which is automatically synchronized on all robots and it a bit complicates things - I have to remember to change platform and branch.
thank you
m.

@m3d
Copy link
Member

m3d commented Sep 5, 2025

Merging as discussed over e-mail, thanks m.

@m3d m3d merged commit 060ff1f into master Sep 5, 2025
@m3d m3d deleted the feature/imu branch September 5, 2025 16:15
@m3d m3d mentioned this pull request Sep 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants