-
Notifications
You must be signed in to change notification settings - Fork 0
2. ROS Setup & Interface
This package was originally developed and tested on ROS Indigo and Ubuntu 14.04 LTS, but the combination of ROS Kinetic and Ubuntu 16.04 LTS should also work.
Assuming that your workspace is located at /home/user/catkin_ws/
git clone ros_powerlink package to your src folder
$ cd ~/catkin_ws/src/
$ git clone https://github.com/SmartRoboticSystems/ros_powerlink.git
Before compilation you need to adopt OPLK_BASE_DIR path in CMakeLists.txt.
Edit line 4 to meet your POWERLINK folder path:
SET(OPLK_BASE_DIR /home/user/openPOWERLINK_V2.5.2)
.
Now compile using catkin_make as usual
$ cd ~/catkin_ws/
$ catkin_make
If build succeeded, ros_powerlink package is ready for use.
ros_powerlink package provides bridge between ROS topics and CiA401 profile. For this purpose custom ROS message type named openPowerlinkMsg is utilized.
openPowerlinkMsg follows CiA401 profile definition and only adopts data types to meet the ROS standards:
std_msgs/Header header
uint8[4] digital_array_AU8
int8[4] analogue_array_AI8
int16[2] analogue_array_AI16
int32 analogue_value_AI32
If you want to send data from you ROS application over POWERLINK, publish data to following topic:
- Topic name: powerlink/data_to_plc
- Topic type: ros_powerlink::openPowerlinkMsg
If you want to read data received from PLC by your ROS application, subscribe to following topic:
- Topic name: powerlink/data_from_plc
- Topic type: ros_powerlink::openPowerlinkMsg
Next step: 3. B&R Automation Studio