Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hadabot Micro-ROS based hardware #13

Closed
dsryzhov opened this issue Oct 23, 2020 · 14 comments
Closed

Hadabot Micro-ROS based hardware #13

dsryzhov opened this issue Oct 23, 2020 · 14 comments

Comments

@dsryzhov
Copy link

Hi Jack,

I've published my Hadabot Micro-ROS based firmware.
https://github.com/dsryzhov/hadabot_rds

See description on the link how to configure and build it
https://github.com/dsryzhov/hadabot_rds/tree/master/hadabot_microros_firmware

It took some time on this week

  • to refactor the original firmware version to use high-level arduino-esp32 API (originally low level esp idf api was used)
  • to create docker image that helps to build the firmware easily

I assume that currently you can build and run it.
On the next step I plan to additionally test and enhance
the firmware after refactoring (to high level hardware api).

Regards,
Dmitry

@dsryzhov
Copy link
Author

Today Micro-ROS team has published precompiled library for Arduino IDE
https://github.com/micro-ROS/micro_ros_arduino
Esp32 architecture is not supported yet in micro-ros arduino library.
But I think it will be added in near time.

Also only serial transport is supported currently (no UDP).

@jackpien
Copy link
Contributor

This is fantastic @dsryzhov

Question - do you know if the agent can be run inside a container in the Hadabot docker-compose stack? This way, "docker-compose up -d" will also launch the agent?

@dsryzhov
Copy link
Author

dsryzhov commented Oct 23, 2020 via email

@jackpien
Copy link
Contributor

jackpien commented Oct 30, 2020

Hi @dsryzhov, this is fantastic work w micro-ROS (aka uROS). The learning curve to set up a build environment for uROS + ESP32 is not easy by any means.

I'm in the process of following your instructions to build and play around with it.

In the meantime - quick question to understand your design objectives: The main motivation for you to work on a uROS variation for the Hadabot firmware was the ROS message latency in using MicroPython as the firmware base?

Were there any other reasons that made the MicroPython firmware functionally sub-optimal?

Thanks!
Jack

@dsryzhov
Copy link
Author

dsryzhov commented Oct 30, 2020 via email

@dsryzhov
Copy link
Author

dsryzhov commented Oct 30, 2020 via email

@jackpien
Copy link
Contributor

Hi @dsryzhov

Difference between start and final position is about 1-5 cm. When rotation is used there are problems with theta angle estimation. It's not very accurate yet. I plan to implement some improvements and tests what I can do.

I think you may be using the rising or falling edge to trigger ISR for wheel encoders. Is that right? If so, the signal out of the sensor is extremely noisy, even cleaned with the capacitor (ie low pass filter). The noisy signal can cause the ISR to trigger even though it is not a large rising edge. That is why I resorted to polling and reading the voltage directly in the original MicroPython firmware. I am experimenting with using a schmit trigger / feedback driven op-amp to make the signal totally square (near zero noise).

By the way what OS do you use? I will help me understand your environment.

I primarily develop on an Ubuntu OS machine. Also work on a MacOS but primarily on Ubuntu.

Question - You use windows right? How did you get the Windows 10 system to find the ESP32? Did you have to install the CP120x driver? Some Hadabot users having trouble with Windows 10. How do you know which COM port Windows connects to when ESP32 plugged in? Sorry, I am a Windows rookie! =)

@dsryzhov
Copy link
Author

dsryzhov commented Oct 31, 2020 via email

@dsryzhov
Copy link
Author

dsryzhov commented Oct 31, 2020 via email

@dsryzhov
Copy link
Author

dsryzhov commented Oct 31, 2020 via email

@dsryzhov
Copy link
Author

dsryzhov commented Oct 31, 2020 via email

@jackpien
Copy link
Contributor

Hi Dmitry, it's been a while since you posted this. As mentioned in #4 - not sure if you saw the ROS Discourse post about an agent-less DDS layer for the ESP32 but that actually looks very interesting. Have you had a chance to play around with this new agent-less DDS layer for the ESP32?

@dsryzhov
Copy link
Author

Hi Jack,

Thanks for the link. It's really interesing.
I've seen this information before and not tested this new implementaion.
I will try it in some time.

I agree that it's good to remove micro-ROS agent in general.
But for my Hadabot firmware it was not a bottleneck, really.

Regards,
Dmitry

@jackpien
Copy link
Contributor

I took a quick look at the new agent-less DDS for ESP32 . Got it compile, flashed, but didn't work (could not see ESP32 node, could not see topic). In any case, because we need the ros2-web-bridge for web utilities, and latency isn't a huge deal breaker yet for edu applications, we will likely not look at micro-ROS in the near future. Closing this for now.

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

No branches or pull requests

2 participants