how to receive topics via an IP address?
(my adapted text) I am running on Arduino 'TCPHelloWorld' which publishes "hello world" through a topic called 'chatter': https://answers.ros.org/question/4068...
For speed reasons, I don't use USB. Instead I connect the Arduino directly to my Ubuntu PC with an ethernet cable. Having no home network involved, there is no local IP address generated. Therefore I entered a local IP address manually in my Ubuntu PC in the yaml file: /etc/netplan/50-cloud-init.yaml
So now my configuration is:
Ubuntu ROS PC (192.168.0.178) |--------ethernet cable --------| Arduino(192.168.177)
ping works fine to both addresses
In /opt/ros/noetic/setup.bash , I have configured:
export ROS_MASTER_URI=http://192.168.0.178:11411
export ROS_IP=192.168.0.178
I then run roscore. Then, when I type: rostopic list I get: Unable to communicate with master
Anyone who can tell me to make a correct one-to-one ethernet connection with a single cable?
Thanks a lot.
It seems that your ROS master is running on a remote PC, i.e., 192.168.0.177. Therefore, you need to set
ROS_MASTER_URI
andROS_IP
environment variables using the appropriate IP addresses on both sides. Furthermore, make sure your firewall is not blocking those calls. For more information, please check [1] and [2].Please show us the source code for this arduino app. I believe it is rare (impossible?) to run full ros on an arduino, so people instead use
rosserial
. Is this app arosserial
client?Hi, Mike. This is the code I am running on the Arduino: https://github.com/ros-drivers/rosser... The IP address in the shield settings is the address I am able to ping from my Ubuntu ROS computer
Please do a web search to learn how to set up rosserial.
While I agree it would help @RH56, it's not really nice to post a (more polite version of) RTFM.
If we feel the
rosserial
documentation could help @RH56, we should point out a specific example or section of the documentation.rosserial
has a rather extensive Tutorials section on the wiki. Perhaps that would help the OP.If you've already read/seen those @RH56, please clarify which part(s) didn't work for you, or was (were) unclear. I have to agree with @Mike Scheutzow reading your post it seems like you haven't looked up the documentation, as that should have made it clear
rosserial
works in a different way from "regular ROS 1", and the terminology/concepts you're using/refering to don't apply/work there.