gentijo / ROSMicroPy

Other
12 stars 3 forks source link

ESP32s3 support #40

Open samuk opened 2 months ago

samuk commented 2 months ago

Hi nice project!

Is the ESP32S3 variant supported? I'd be interested in trying out the cam code on a Xiao and maybe a makerfabs IPS screen one

I'd like to do some 'eyes' for the the maker fabs screen at some point to give my Rosmo robot a bit of personality. It seems somewhat similar to your RMP core. Do you have any more details about that robot?

gentijo commented 2 months ago

Hi @samuk, Rosmo looks like a cool build, I will def look into it more. Are the boards avail to purchase ?

I like the micro:bit format but the mbits board may be on their way out and it's an ESP32 vs ESP32S3. The S3 has the advantage of more DRAM being available.

Ok, for your question, the build process has changed a bit and the docs updates are lagging..

I have reconfigured all the modules to be native Micropython user_c_modules vs my quasi MicroROS based build process.

For the most part, follow the Micropython build instructions. i.e. In the project dir, run git submodule update --init --recursive then cd micropython/ports/esp32 and use idf.py -D MICROPY_BOARD=RMP_ESPCAM_S3 -DUSER_C_MODULES=../../../../modules build

Change the board name for the other flavors of the RMP build.

Currently I am using a custom fork of Micropython, to handle the board / main directory but I have plans to go back to the main line repo as I think I have figured out a way that I won't need my mods.

Some parts of this project are still a bit of work in progress. For ESPCAM, the rmp_start_espcam, runs in auto publish mode, meaning that it starts a ROS timer and publishes images at a rate of 5 frames/sec. I don't think it keeps up with that. Along with all the other MicroROS supporting functions, setNodeName, SetAgentIP / Port, etc.

See the espcam_test.py example code.

Currently it does not pass the image to Micropython, as it publishes an image based on a ROS Timer. I also need to add a MP method to be able to set the topic name for the module or add it as a parameter for rmp_espcam_start.

Note: RMP Core type support currently does not support sequences, that is why I only have the auto publish running. the sensor_msg::/image/compressed uses a sequence to transmit the image.

I am currently working on creating a jpeg stream widget for the LCD_CONTROLLER.

The LCD_Controller code currently supports this display https://www.aliexpress.us/item/3256804913729039.html it also supports the 7" variant. . Let me know if you have other questions.

-John

samuk commented 2 months ago

Great stuff, I will take a look. I'm going to focus on getting https://github.com/hippo5329/linorobot2_hardware/wiki working on it first, then I'll definitely dive into Micropython. Presumably it should be possible to talk to the Linorobot stack using Micropython device?

"Are the boards avail to purchase ?" Not yet I'm still at the fixing stupid mistakes stage, hopefully soon.