ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to configure my node/computer for processing

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

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 https://answers.ros.org/question/3709...

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

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

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

Comments

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

ROS_MASTER_URI is on the robot.

Inside the launch file I wrote it as:

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

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

network error connecting to [10.0.0.166:22]: timed out

Furthermore, when I try to ping from the robot, to 10.0.0.166 (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 -0500 )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 10.0.0.166 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 -0500 )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 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 198 times

Last updated: Feb 04 '21