I try to connect real robot using socket but it shows 'socket connection refused' [closed]

asked 2021-03-22 20:29:29 -0500

xiaozhenghong gravatar image

In linux, I run a socket client python file and it returns socket connection refused.I ping the address of the robot system and it works.Then, I use a socket_tool.exe software which successfully send command to the robot. I am confused about the reason why I cannot use python socket to send command to the to robot.

The following is the socket cilent code writing by python.

import socket

target_ip = ("192.168.1.12" , 2000)

sk = socket.socket()

sk.connect(target_ip)

send_cmd = 'shutdown'

sk.send(send_data1.encode('utf8'))

edit retag flag offensive reopen merge delete

Closed for the following reason question is off-topic or not relevant. Please see http://wiki.ros.org/Support for more details. by gvdhoorn
close date 2021-03-23 03:29:28.215763

Comments

I'm sorry, but this doesn't seem ROS related.

Please post your question on a more appropriate forum instead.

gvdhoorn gravatar image gvdhoorn  ( 2021-03-23 03:29:45 -0500 )edit