-
Notifications
You must be signed in to change notification settings - Fork 53
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
USB interface #44
Comments
@pablogs9 Thanks for the quick response! I have thus changed the interface to use UART port 0 (set manually because for some reason it doesn't propagate the values I set in the menuconfig to the actual C code)
However when I try to launch the docker container with your command line I only get the following: but I do not see the ROS node or that anything is being published. Int32_custom is flashed and the connection can be established correctly. Any pointers would be greatly appreciated! |
Have you rebuilt the library after changing In order to clean all and rebuild from scratch you can do a |
@pablogs9 yes I changed the
Using the docker command I get the same output as posted in my previous comment. |
Ok, I have been testing the app and I found a couple of problems. I have fixed them in #46. Please use a clean environment to ensure that you have the fix, the procedure should be: git clone https://github.com/micro-ROS/micro_ros_espidf_component
cd micro_ros_espidf_component
# Modify the meta
sed -i 's/DRMW_UXRCE_TRANSPORT=udp/DRMW_UXRCE_TRANSPORT=custom/' colcon.meta
cd examples/int32_publisher_custom_transport
#MODIFY HERE THIS LINE https://github.com/micro-ROS/micro_ros_espidf_component/blob/97a164c31bef70e14eef4d45ed33dbf3549d31c4/examples/int32_publisher_custom_transport/main/main.c#L83
idf.py build flash
# Do not monitor because it will occupy the serial port that the micro-ROS Agent needs
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:foxy serial --dev /dev/serial/by-id/[YOUR DEV] -v6 Let me know if this works |
Hi @pablogs9 thanks for the quick reply.
Flashing of the arduino is successful.
but am stuck with the same logger_info as the image I shared above, but nothing else happens. I have tried logging into the docker and running |
In order to discard a problem in your serial port, could you open a serial terminal and check if your board is writing something in the serial port? Something like: miniterm.py [your serial port] 115200 or minicom -D [your serial port] -b 115200 |
@pablogs9 here is the output of miniterm. In the beginning it seems to print something fine (5-7 seconds) and then after a while prints the uart driver error However, I got it to work somewhat.. If I start the docker immediately then I can establish a connection. It seems to be a timing issue but it also resets the counter and the device itself. This is probably not expected behavior. Data usually is 0 but sometimes counts up to 1-6. I'm guessing it should count up continuously? I've added the output here, it seems to reset and reinitialize the publisher quite frequently, this is also apparent when I |
Ok if you open the agent and reset the board it should connect and start publishing. Then do a |
It only publishes around 2 seconds before automatically resetting. I've tried both physical reset button and |
Two ideas:
|
We set the micro ROS stack to 20000
I tried using your WiFi example instead, again it can compile and flash. But I cannot get an output on the micro-ros docker. The esp32 board is pingable and has a valid IP address (192.168.0.115). I set that in the menuconfig but unfortunately no ros2 output. |
In the micro-ROS menuconfig you should set the micro-ROS Agent IP, this is your PC IP, not the IP of the micro-ROS client running in the ESP32. Can you try that? |
Okay, so UDP configuration works very well after changing the IP. No resets of the board, automatic connection, very nice. |
I think that a good solution is to separate the debug and micro-ROS serial ports in order to check what is happening. |
I solved this by ensuring a proper install of the micro ros agent and a correct esp-idf version that is compatible. |
Hi
Thanks for this great library.
Is it possible to use USB to publish ROS messages instead of Wifi or UART pins?
We are using an ESP32 connected to a Linux machine via USB and would like to send messages across that interface.
I was looking at the custom_publisher example but I'm a bit unsure how to proceed in order to use USB as far as I understood it's used for UART communication via arduino pins.
Any info would be greatly appreciated, thanks!
Thanks
The text was updated successfully, but these errors were encountered: