Bridging ROS system and CANopen network real-time communication method
A technology of network real-time communication and CAN bus, which is applied in the field of network communication, can solve problems such as the inability to realize real-time interaction between ROS and CAN bus, and achieve flexible access and control of slave devices, easy implementation, and improved data transmission efficiency.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0025] In the embodiment of the present invention, a kind of real-time communication method of bridging ROS system and CANopen network is provided, and ROS system comprises CANopen drive module, CANopen core module, CANopen main station module and CANopen bridging module, CANopen drive module, CANopen core module, CANopen The master station module and the CANopen bridge module are sequentially designed from the bottom layer to the highest layer; the method includes steps:
[0026] S1. Drive the CAN hardware device of the PC platform through the CANopen driver module to realize the opening and closing of the CAN bus and the sending and receiving operations of CAN messages. Among them, the main program source code for the realization of the CAN hardware device is:
[0027] Functions provided by the driver module:
[0028] Receive message: canReceive_driver
[0029] Send message: canSend_driver
[0030] Open the CAN bus: canOpen_driver
[0031] Close the CAN bus: canClose_driv...
Embodiment 2
[0046] Adopt X86 platform to add USB-to-CAN adapter card to connect a Cia-402 protocol joint motor and its Cia-406 encoder of the mechanical arm on the CAN bus with the control system hardware part of the present invention; The real-time Linux operating system is used to provide fully preemptive process scheduling to realize the real-time ROS domain. The method of the present invention is described in detail, and the specific process is as follows:
[0047] Firstly, the CAN driver is reused by the CANopen driver module, such as PCAN and SocketCAN, which are provided by the CanFestival project through its simple C interface to solve the communication problem with CAN hardware; in actual operation, the C interface only includes the changeBaudrate, open , close, receive and send functions; the CANopen driver module is compatible with CanFestival, which provides more than 20 different CAN drivers, and solves the problem of communicating with various CAN hardware on different platfo...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


