Closed miguelriemoliveira closed 5 months ago
@manuelgitgomes , thanks for the research work. From what I read it should be possible, but there are also some people reporting problems and others saying this is not recommended.
I will make a simple ROS Melodic -> rabitmq -> ROS Noetic example just in case we need it.
It might be relevant to show you my current pc setup and specs.
Im running kernel 6.6.23-1-lts
on my host and using a ubuntu 20.04 distrobox docker container
.
I reckon using a container might induce some communication issues somewhere in the network chain but we'll see.
Right that's similar to what I have so it should be fine ...
I reckon using a container might induce some communication issues somewhere in the network chain but we'll see.
If I recall correctly, Distrobox has --network=host
by default, so networking issues should be seamless.
You could see that when using the VLP16, as no problem arose in there.
Ok, so I was working on this today.
I developed a translator from ROS to mqtt back to ROS based on mosquitto (https://mosquitto.org/).
Later I found that this exists in ros already but I had everything done already so lets use this one. I did not find it in the initial search because my initial intention was using rabbitmq.
Anyway, the code is here:
https://github.com/lardemua/ros_mqtt_bridge
There are two scripts:
ros_to_mqtt subscribes to all ros topics listed in the topics.yml file. When a ROS message is received it is published on mqtt using the same topic name.
mqtt_to_ros subscribes to all mqtt topics listed in the topics.yml file, and creates a corresponding ros publisher for each. When a mqtt message is received, it is published on ROS using the same topic name.
I tested in different configurations using distrobox:
All cases work fine. I think this should solve the problem of how to use the Zau computer together with @brunofavs 's laptop.
Tip: if you test use the --verbose flag to see the message traffic printed to the terminal.
Hi @manuelgitgomes , @Kazadhum and @brunofavs ,
I got home and tested the mosquitto pub and sub and it worked. I think you should not waste time on this. Focus on the intrinsic calibrations if you can.
Teh communications should work fine I think. I will meet you Thursday morning to test them again.
BTW I did the following.
mosquitto installed on the host, not on the containers. Configuration file like this:
# Place your local configuration in /etc/mosquitto/conf.d/
#
# A full description of the configuration file is at
# /usr/share/doc/mosquitto/examples/mosquitto.conf.example
persistence true
persistence_location /var/lib/mosquitto/
log_dest file /var/log/mosquitto/mosquitto.log
include_dir /etc/mosquitto/conf.d
listener 1883
allow_anonymous true
I used the home wireless network and was able to send one message from one computer to another.
first the subscriber:
mosquitto_sub -v -t 'test/topic'
then the publisher:
mosquitto_pub -t 'test/topic' -m 'helloWorld334345' -h 192.168.0.16
and it worked!
Hi @miguelriemoliveira!
Great news! By the way, did you test it on 2 different machines or on 2 different containers inside one machine?
It seems like it's 2 PCs, but just making sure.
Great news! By the way, did you test it on 2 different machines or on 2 different containers inside one machine?
two different pcs
@rarrais I just finished the README file for the ros to mqtt translation so you can test on your side. Sorry for taking so long.
It's here:
https://github.com/lardemua/ros_mqtt_bridge
We test on our side and it seems to be working fine. If you need some help let me know.
This was already solved with:
Related to #904
tagging @manuelgitgomes , @Kazadhum , @brunofavs and @rarrais for visibility email from Manuel: