Nothing Special   »   [go: up one dir, main page]

CN112672327A - Closed apple orchard multi-robot communication system based on TCP/IP protocol - Google Patents

Closed apple orchard multi-robot communication system based on TCP/IP protocol Download PDF

Info

Publication number
CN112672327A
CN112672327A CN202110078432.4A CN202110078432A CN112672327A CN 112672327 A CN112672327 A CN 112672327A CN 202110078432 A CN202110078432 A CN 202110078432A CN 112672327 A CN112672327 A CN 112672327A
Authority
CN
China
Prior art keywords
robot
orchard
piloting
protocol
following
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110078432.4A
Other languages
Chinese (zh)
Inventor
杨福增
刘恒
毛文菊
郭鹏举
李亚男
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwest A&F University
Original Assignee
Northwest A&F University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwest A&F University filed Critical Northwest A&F University
Priority to CN202110078432.4A priority Critical patent/CN112672327A/en
Publication of CN112672327A publication Critical patent/CN112672327A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Manipulator (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention relates to the technical field of orchard multi-robot communication, and provides a closed apple orchard multi-robot communication system based on a TCP/IP protocol, which comprises at least three orchard robots and an AP communication module; the orchard robot at least comprises a wireless communication module, a power module, an industrial personal computer, a chassis, a CAN bus, a driving motor, a sensor module and a display screen; the AP communication module comprises a 220V outdoor mobile power supply, a PoE module and a wireless AP; the orchard multi-robot formation method includes the steps that orchard multi-robots are formed in a piloting following mode, each robot is connected with a wireless AP, the piloting robots are set to be servers through static IP address configuration, the following robots are set to be clients, and mutual communication among the orchard multi-robots is achieved through a TCP/IP protocol. The full-duplex communication between the multiple robots in the orchard provided by the invention is based on a TCP/IP protocol, the expansibility is strong, the transportability is high, and meanwhile, the Wi-Fi communication is adopted, so that the transmission speed is high, the cost is low, and the communication requirement of the multiple robots for cooperative operation in the closed orchard environment is met.

Description

Closed apple orchard multi-robot communication system based on TCP/IP protocol
Technical Field
The invention relates to the technical field of orchard multi-robot communication, in particular to a closed apple orchard multi-robot communication system based on a TCP/IP protocol.
Background
China is the biggest apple producing country in the world, and the types of orchards are mainly divided into a traditional orchards with vigorous and closed structure and a modern orchard with short anvils opened. Wherein, traditional orchard planting area accounts for about 75% of the total area of orchard planting. Branches in the traditional orchard are crossed, short and closed, and the trafficability of fruit growers in the orchard during operation is poor. The cost investment of a new orchard is large, and the acceptance degree of farmers to a brand-new orchard management mode restricts the promotion of modern orchards. For fruit growers and apple growers, most apple orchard types are still closed orchards, the management mode mainly adopts manpower, the operation task is heavy, and the labor cost investment is large. Therefore, the orchard automation is vigorously developed, the operation efficiency of the closed apple orchard is improved, and the labor cost is reduced.
Under the complex closed orchard environment, the multi-robot system has good self-adaptive capacity and can cooperate with each other to operate. In addition, multiple robots can communicate with each other, if one robot fails, other robots can replace the robot to continue to execute tasks, and certain reliability is achieved. Therefore, agricultural multi-robot research and development increasingly become a research hotspot of the current agricultural robots.
Communication is one of the key technologies of a multi-robot system, and is an important basis for realizing multi-robot cooperative work. At present, researchers research multi-robot communication systems based on a TCP/IP protocol or an improved routing protocol, but most of the studies on the communication of the multi-robot systems in a closed apple orchard have not been reported, wherein the communication between multi-robot character models is realized in a laboratory environment. And the closed apple orchard environment is complex, the communication system is more huge, and the requirement on the multi-robot communication system is higher. Therefore, the research is suitable for a communication system of multiple robots in a closed apple orchard, and the foundation significance is laid for the cooperative cooperation among all the single robots in the system.
Disclosure of Invention
Aiming at the problems, the invention provides a closed apple orchard multi-robot communication system based on a TCP/IP protocol, which adopts Wi-Fi communication, has high transmission speed and low cost, meets the communication requirement of cooperative operation of multiple robots in a closed orchard environment, and has strong expansibility and high portability.
In order to solve the technical problems, the invention adopts the following scheme:
the closed apple orchard multi-robot communication system based on the TCP/IP protocol is characterized by comprising at least three orchard robots and an AP communication module; the orchard robot at least comprises a wireless communication module, a power module, an industrial personal computer, a chassis, a CAN bus, a driving motor, a sensor module and a display screen; the AP communication module comprises a 220V outdoor mobile power supply, a PoE module and a wireless AP; the orchard multi-robot formation is carried out in a piloting following mode, each robot is connected with a wireless AP, the piloting robots are set to be servers through static IP address configuration, the following robots are set to be clients, the networking mode of a basic network in a wireless local area network is completed, and the TCP/IP protocol is utilized to realize the mutual communication among the orchard multi-robot.
Further, the static IP address configuration procedure includes:
(1) editing the network connection;
(2) an Add network;
(3) creating a new Wi-Fi;
(4) editing the name of the new Wi-Fi, the Wi-Fi SSID and the mode;
(5) edit IPv4 Settings for new Wi-Fi.
Further, the using of the TCP/IP protocol to achieve the intercommunication flow among the orchard robots includes:
(1) creating Create SocketServer (), by the piloting robot;
(2) a piloting robot bind socket;
(3) the piloting robot calls a listen _ socket _ fd to monitor a connection request sent by the following robot;
(4) the following robot creates a SocketClient ();
(5) the following robot calls connect () to send a connection request to the piloting robot according to the IP address and the port number of the piloting robot;
(6) the piloting robot receives a connection request of the following robot;
(7) the following robot is successfully connected;
(8) pilot robot accept ();
(9) starting keepalive attribute following the robot;
(10) the following robot sends information such as self position, driving speed, power module electric quantity and the like acquired by the sensor module to the piloting robot, and the piloting robot receives the information;
(11) the piloting robot sends information such as self position, driving speed, power module electric quantity and the like acquired by the sensor module to the following robot, and the following robot receives the information;
(12) closing the following robot;
(13) and closing the piloting robot.
Further, the wireless communication module is a wireless router, the industrial personal computer is provided with a Ubuntu 16.04 system, the sensor module is used for collecting information such as the position, the running speed and the electric quantity of the power module of the orchard robot, the display screen is used for displaying the information of the robot collected by the sensor module, the AP communication module is carried on the middle robot, and the wireless AP type is WISE-5121.
The invention has the beneficial effects that:
(1) Wi-Fi communication is adopted, the transmission speed is high, the cost is low, and the communication system has higher effectiveness;
(2) the static allocation of the IP address is adopted, the setting is simple and clear, the stability in a network which is not changed frequently is good, and the debugging is relatively easy;
(3) the data is transmitted by adopting a wide TCP/IP protocol, the expansibility is strong, and the transportability is high;
(4) by using a keepalive keep-alive mechanism, the process or resource hang-up caused by unexpected abnormality of multiple robots in a closed orchard complex environment can be avoided, and the robustness is good.
Drawings
FIG. 1 is a schematic structural diagram of a closed apple orchard multi-robot communication system based on a TCP/IP protocol;
FIG. 2 is a flow chart of static IP address configuration of a closed apple orchard multi-robot communication system based on a TCP/IP protocol;
fig. 3 is a communication flow chart between a pilot robot and a following robot of the closed apple orchard multi-robot communication system based on the TCP/IP protocol.
Detailed Description
The invention is described in further detail below with reference to the accompanying drawings:
as shown in fig. 1, the invention provides a closed apple orchard multi-robot communication system based on a TCP/IP protocol, which comprises at least three orchard robots and an AP communication module; the orchard robot at least comprises a wireless communication module, a power module, an industrial personal computer, a chassis, a CAN bus, a driving motor, a sensor module and a display screen; the AP communication module comprises a 220V outdoor mobile power supply, a PoE module and a wireless AP; the orchard multi-robot formation method includes the steps that orchard multi-robots are formed in a piloting following mode, each robot is connected with a wireless AP, the piloting robots are set to be servers through static IP address configuration, the following robots are set to be clients, and mutual communication among the orchard multi-robots is achieved through a TCP/IP protocol.
As shown in fig. 2, the IP address configuration of the orchard robot in the Ubuntu 16.04 system mainly includes the following steps:
step1, editing Network connection, clicking Edit Connections, and entering Network Connections;
step2, Add new network connection;
step3, in the new network type configuration, Hardware selects Wi-Fi to create;
step4, editing the name of the new Wi-Fi connection, a Wi-Fi SSID and a mode, setting the network name and the SSID as the same for a plurality of robots in the orchard, setting the mode of the piloting robot as a Server, and setting the following robot as the Server;
step5, editing IPv4 Settings connected with a new Wi-Fi, wherein a Method selects Manual, three positions before the orchard robot Address are set to be the same (if 192.168.62.x, x cannot be set to be 1), Netmask is uniformly set to be 24, and Gateway is 192.168.62.1, so that the static IP Address configuration of the orchard multi-robot communication system is completed.
As shown in fig. 3, the communication flow between the piloting robot and the following robot of the orchard multi-robot communication system mainly includes the following steps:
step1, creating Create SocketServer (), by the piloting robot;
the navigation robot sets an address type AF _ INET to be IPv4 network communication, selects a STREAM socket (SOCK _ STREAM) of an AF _ INET Protocol family according to the type of a socket, and establishes a SocketServer () by taking a supported Protocol as IPPROTO _ TCP, so that the communication requirement between at least two orchard following robots is met.
Step2, piloting robot bind socket;
the piloting robot binds the local address Localaddr (192.168.62.2) and port number (25550) to the socket and creates a file descriptor socket _ fd.
Step3、listen();
The piloting robot calls a listen _ socket _ fd to monitor a connection request sent by the following robot, the socket is changed into a passive type, and the connection request of the following robot is waited. At this time, the piloted robot socket is still in a close state.
Step4, following the robot to create a SocketClient ();
step5, the following robot calls connect () to send a connection request to the pilot robot according to the IP address (192.168.62.2) and the port number (25550) of the pilot robot;
step6, after the pilot robot receives the connection request of the following robot, the pilot robot is passively opened, and a new socket corresponding to the connection is returned to save the new connection. At this time, socket enters blocking mode;
step7, the following robot is successfully connected, and connection state information is sent to the navigation robot;
step8, returning an accept () of the piloting robot, and successfully connecting;
step9, starting a keepalive attribute by the following robot;
if the connection has no data to come and go within 60 seconds, detecting, and setting the time interval of the sending packet during detection to be 5 seconds; if the 1 st probe packet receives a response, the latter 2 probe packets are not sent again.
If it is connecting, listen for the changed state of file descriptor fd (read-write or exception) through selet. The selet listen timeout is set to 5s and if 5s still has no connection established, the next connection is disconnected. After the connection is successfully established, the socket is restored to a blocking mode, so that the receiving and sending are facilitated. And setting receiving overtime, starting a data receiving thread, and closing the socket if overtime or connection is wrong.
Step10, the following robot sends information such as self position, driving speed and power module electric quantity acquired by the sensor module to the piloting robot, and the piloting robot receives the information;
before data is sent, the length len of data to be sent is compared with the length of a sending buffer area of a socket s. If len is greater than the length of s' send buffer, the function returns SOCKET _ ERROR; if len is less than or equal to the length of s's send buffer, send checks first whether the data in s ' send buffer is being sent, if yes, waits for the protocol to send the data, if the protocol has not started sending the data in s ' send buffer or there is no data in s ' send buffer, send compares the remaining space of s ' send buffer with len; if len is larger than the size of the residual space, send always waits for the protocol to finish sending the data in the sending buffer of s; if len is smaller than the size of the remaining space, send simply copies the data in the buffer buf of data into the remaining space. If the send function copy data is successful, returning the byte number of the actual copy; if send is in ERROR with copy data, send returns SOCKET _ ERROR; the send function also returns SOCKET _ ERROR if the send is disconnected from the network while waiting for the protocol to transmit data.
The pilot robot sets the receive timeout time to 0.2 seconds, and traverses all possible file descriptors to check which activity occurred on top. If the file descriptor set fds [ i ] bit has been identified, i.e., there is data, then set the socket to non-blocking mode; if the received data of the piloted robot is zero, i.e. receive returns 0, indicating that the following robot has been closed, the file descriptor fds [ i ] is closed, and the received data is parsed.
Step11, the piloting robot sends information such as self position, driving speed, power module electric quantity and the like acquired by the sensor module to the following robot, and the following robot receives the information;
1) waiting for the completion of the transmission of the data in the transmission buffer of s by the protocol, and if the protocol generates a network ERROR when transmitting the data in the transmission buffer of s, returning a receive function to SOCKET _ ERROR;
2) if the sending buffer of s has no data or the data is successfully sent by the protocol, the receive first checks the receiving buffer of the socket s, and if the receiving buffer of s has no data or the protocol is receiving data, the receive waits until the protocol finishes receiving the data. When the protocol finishes receiving the data, the receive function copies the data in the receiving buffer of s to buf, and the receive function returns the byte number of the actual copy. If recive is in ERROR at copy, it returns SOCKET _ ERROR; if the receive function is interrupted by the network while waiting for the protocol to receive data, 0 is returned.
The following robot sets the receiving overtime time to be 0.2 second, and if the receiving data is zero, the following robot is closed.
And Step12, closing the following robot and recovering thread resources.
And Step13, closing the piloting robot and recovering thread resources.
The present invention is not limited to the above embodiments, and any modifications, substitutions, and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (4)

1. The closed apple orchard multi-robot communication system based on the TCP/IP protocol is characterized by comprising at least three orchard robots and an AP communication module; the orchard robot at least comprises a wireless communication module, a power module, an industrial personal computer, a chassis, a CAN bus, a driving motor, a sensor module and a display screen; the AP communication module comprises a 220V outdoor mobile power supply, a PoE module and a wireless AP; the orchard multi-robot formation is carried out in a piloting following mode, each robot is connected with a wireless AP, the piloting robots are set to be servers through static IP address configuration, the following robots are set to be clients, the networking mode of a basic network in a wireless local area network is completed, and the TCP/IP protocol is utilized to realize the mutual communication among the orchard multi-robot.
2. The closed apple orchard multi-robot communication system based on the TCP/IP protocol as claimed in claim 1, wherein the static IP address configuration process comprises:
(1) editing the network connection;
(2) an Add network;
(3) creating a new Wi-Fi;
(4) editing the name of the new Wi-Fi, the Wi-Fi SSID and the mode;
(5) edit IPv4 Settings for new Wi-Fi.
3. The closed apple orchard multi-robot communication system based on the TCP/IP protocol as claimed in claim 1, wherein the using the TCP/IP protocol to achieve the mutual communication flow among the orchard multi-robot comprises:
(1) creating Create SocketServer (), by the piloting robot;
(2) a piloting robot bind socket;
(3) the piloting robot calls a listen _ socket _ fd to monitor a connection request sent by the following robot;
(4) the following robot creates a SocketClient ();
(5) the following robot calls connect () to send a connection request to the piloting robot according to the IP address and the port number of the piloting robot;
(6) the piloting robot receives a connection request of the following robot;
(7) the following robot is successfully connected;
(8) pilot robot accept ();
(9) starting keepalive attribute following the robot;
(10) the following robot sends information such as self position, driving speed, power module electric quantity and the like acquired by the sensor module to the piloting robot, and the piloting robot receives the information;
(11) the piloting robot sends information such as self position, driving speed, power module electric quantity and the like acquired by the sensor module to the following robot, and the following robot receives the information;
(12) closing the following robot;
(13) and closing the piloting robot.
4. The closed apple orchard multi-robot communication system based on the TCP/IP protocol as recited in claim 1, wherein the wireless communication module is a wireless router, the industrial personal computer is provided with an Ubuntu 16.04 system, the sensor module is used for collecting information such as the self position, the driving speed and the electric quantity of the power supply module of the orchard robot, the display screen is used for displaying the robot information collected by the sensor module, the AP communication module is mounted on the middle robot, and the wireless AP is WISE-5121.
CN202110078432.4A 2021-01-21 2021-01-21 Closed apple orchard multi-robot communication system based on TCP/IP protocol Pending CN112672327A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110078432.4A CN112672327A (en) 2021-01-21 2021-01-21 Closed apple orchard multi-robot communication system based on TCP/IP protocol

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110078432.4A CN112672327A (en) 2021-01-21 2021-01-21 Closed apple orchard multi-robot communication system based on TCP/IP protocol

Publications (1)

Publication Number Publication Date
CN112672327A true CN112672327A (en) 2021-04-16

Family

ID=75415873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110078432.4A Pending CN112672327A (en) 2021-01-21 2021-01-21 Closed apple orchard multi-robot communication system based on TCP/IP protocol

Country Status (1)

Country Link
CN (1) CN112672327A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080133052A1 (en) * 2006-11-29 2008-06-05 Irobot Corporation Robot development platform
CN104238552A (en) * 2014-09-19 2014-12-24 南京理工大学 Redundancy multi-robot forming system
CN110398975A (en) * 2019-09-04 2019-11-01 西北工业大学 A kind of navigator's follower type multiple aircraft formation fault tolerant control method based on broadcast operation framework

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080133052A1 (en) * 2006-11-29 2008-06-05 Irobot Corporation Robot development platform
CN104238552A (en) * 2014-09-19 2014-12-24 南京理工大学 Redundancy multi-robot forming system
CN110398975A (en) * 2019-09-04 2019-11-01 西北工业大学 A kind of navigator's follower type multiple aircraft formation fault tolerant control method based on broadcast operation framework

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
朱海: "农业多机器人无线通信平台的研究与设计", 《中国优秀硕士学位论文全文数据库》 *
袁佳泉: "变电站巡检机器人控制系统设计与开发", 《中国优秀硕士学位论文全文数据库》 *

Similar Documents

Publication Publication Date Title
CN112671638B (en) Gateway structure for multi-protocol conversion
CN102546619B (en) Modbus protocol conversion system based on 3G (The 3rd Generation Telecommunication) Internet access
US6898183B1 (en) Method of determining a data link path in a managed network
CN106534178B (en) System and method for realizing RapidIO network universal socket
CN102511151A (en) Router, virtual cluster router system and establishing method thereof
CN102811219A (en) Method for remotely accessing desktop of computer in intranet across network segments in cluster system
CN107147655A (en) A kind of network dual stack parallel process model and its processing method
US20230198874A1 (en) Link detection method and system
CN107453849A (en) Mutual-backup linkage method and system for wired link and wireless link of power distribution communication network and air-ground mutual-backup integrated device
CN109067633B (en) Power management system and method based on Ethernet daisy chain communication network topology
CN104881008A (en) Remote monitoring system based on Internet-of-Things
CN103532863A (en) Method and device for realizing software stacking
CN102137310A (en) Distributed real-time control building intercom system
CN100492985C (en) Managing method of network apparatus based on access controlling layer of Ethernet medium
CN113300821B (en) Dual-network-card network hot standby method and system based on sniffing technology
CN107094187A (en) A kind of method of the access switch port of automatic lookup MAC Address
CN106533934A (en) Border gateway applicable to all interconnected manufacturing networks
CN112672327A (en) Closed apple orchard multi-robot communication system based on TCP/IP protocol
TWM608116U (en) Signal transmission device
CN116827801A (en) Network topology construction method, device, computer equipment and readable storage medium
CN106411616B (en) A kind of device and method by 1553B bus management ethernet terminal
CN1620021A (en) Radio transmission network system based on embeddod platform
CN107425998A (en) A kind of communication link support method based on industrial WIFI
CN109951212A (en) A kind of remote audio line data communication package based on PRIME standard
CN202870525U (en) Networked data acquisition apparatus applied to changing environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20210416

RJ01 Rejection of invention patent application after publication