Ask Your Question

How to configure my node/computer for processing

asked 2021-02-04 18:09:32 -0600

gup_08 gravatar image

Hi all, new to ROS, absorbing all the information of the forum but I have not reached a definitive answer to my problem: I have a line follower robot using OpenCV to track the line. I am using Putty to connect to it and launch the code which displays a window of the camera which is incredibly laggy.

Now, I'm 100% sure the processing is happening in the robot. But how do I code it so it's performed in the PC?

my code is here

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2021-02-04 21:12:44 -0600

tryan gravatar image

Here's a ROS tutorial for multiple machines for getting started. I recommend taking a look at the rest of them, too. Basically, once you have ROS on both machines and the network is configured so they can communicate, you just need to run each node on the machine you choose. If you use a launch file, you can assign nodes to different machines using the machine tag.

In your case, each of your scripts starts a node on the robot. To do the calculations on your PC, you just have to run that node (script) on your PC instead. Since each node defines ROS subscribers and publishers, ROS will handle the topic connection and communication.

edit flag offensive delete link more


Thank you greatly for your insight on the machine tag. My configuration is as follows: Hostname: [PC] Hostname: [Robot]

ROS_MASTER_URI is on the robot.

Inside the launch file I wrote it as:

<machine name="DellLaptop" address="" env-loader="/opt/ros/melodic/" user="Cae"/>

Yet when I run the roslaunch from the remote pc I get the following:

network error connecting to []: timed out

Furthermore, when I try to ping from the robot, to (PC) I get a message that I lost all the packages... it's not sending anything. Would you know?

gup_08 gravatar image gup_08  ( 2021-02-05 01:10:55 -0600 )edit

I assume you've already looked through the network setup tutorial and that you can ping the robot from your PC since you're able to connect with PuTTY, but you could check anyway. My guess is that there's a NAT issue, so that isn't the PC's address as seen by the robot. There are tools, like wireshark, you can use to see the IP address of incoming connections, but there may be an easier way if you do some searching; this SO post suggests the pinky command, but I have no experience with it.

tryan gravatar image tryan  ( 2021-02-05 09:22:16 -0600 )edit

Are you connected to the same network? Maybe the ip of your pc is about another network or if you have ethernet and wifi you are using the wrong device ip

rdelgadov gravatar image rdelgadov  ( 2021-02-05 13:21:22 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2021-02-04 18:09:32 -0600

Seen: 58 times

Last updated: Feb 04 '21