jodle001 / ros2_pyads Goto Github PK
View Code? Open in Web Editor NEWThis is a ros2 package that will be a wrapper around the pyads library to have communication between ros2 and beckhoff PLCs.
This is a ros2 package that will be a wrapper around the pyads library to have communication between ros2 and beckhoff PLCs.
I think it would be great to have an explicit license declaration in the packages. Not only the fields have a TODO, but that also provides a clear indication on your plans for the project.
For reference:
Thanks for considering it!
Complete set(srv_files "srv/ReadBool.srv" "srv/WriteBool.srv" "srv/ReadString.srv" **"srv/ReadByteArray.srv"** )
in https://github.com/jodle001/ros2_pyads/blob/main/ros2_pyads_interfaces/CMakeLists.txt
for successful generation of custom srv message
Here is the function in question. which doesn't return any boolean value.
ros2_pyads/ros2_pyads/ros2_pyads/ads_com.py
Lines 59 to 68 in b2dab04
Here is where it is returning false in every case:
ros2_pyads/ros2_pyads/ros2_pyads/ads_com_bool_test_node.py
Lines 41 to 47 in b2dab04
Every time something is read or written it restarts the pyads connection which is unnecessary. So moving this to the constructor should be better.
ros2_pyads/ros2_pyads/ros2_pyads/ads_com.py
Lines 55 to 56 in b2dab04
I've tried to download ros2_pyads and to install it. Everything went smoothly, however when I try to launch
ros2 launch ros2_pyads ads_com_bool_test.launch.py
I get the following error:
[INFO] [launch]: All log files can be found below C:\Users\dinterra.ros\log\2024-06-12-19-03-33-196428-DIN-IRMA-LT01-25096
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ads_com_bool_test_node.EXE-1]: process started with pid [10948]
[ads_com_bool_test_node.EXE-1] Traceback (most recent call last):
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\lib\ros2_pyads\ads_com_bool_test_node-script.py", line 33, in
[ads_com_bool_test_node.EXE-1] sys.exit(load_entry_point('ros2-pyads==0.0.0', 'console_scripts', 'ads_com_bool_test_node')())
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com_bool_test_node.py", line 53, in main
[ads_com_bool_test_node.EXE-1] ADSComBoolTestNode()
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com_bool_test_node.py", line 44, in init
[ads_com_bool_test_node.EXE-1] var_value=not self.ads_com.read_by_name('MAIN.bTest', pyads.PLCTYPE_BOOL), # Toggle the existing value
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com.py", line 68, in read_by_name
[ads_com_bool_test_node.EXE-1] raise e
[ads_com_bool_test_node.EXE-1] File "C:\dev\ros2_ws\install\Lib\site-packages\ros2_pyads\ads_com.py", line 64, in read_by_name
[ads_com_bool_test_node.EXE-1] var = self.plc.read_by_name(var_name, var_type)
[ads_com_bool_test_node.EXE-1] AttributeError: 'ADSCom' object has no attribute 'plc'
[ERROR] [ads_com_bool_test_node.EXE-1]: process has died [pid 10948, exit code 1, cmd 'C:\dev\ros2_ws\install\lib\ros2_pyads\ads_com_bool_test_node.EXE --ros-args --params-file C:\Users\dinterra\AppData\Local\Temp\launch_params_zazljcay --params-file C:\Users\dinterra\AppData\Local\Temp\launch_params_5wyx8mi_'].
The comconfig file was changed with these values:
'sender_ams': '192.168.12.253.1.1',
'plc_ip': '192.168.12.253',
'route_name': 'ROS2PLC',
'host_name': '192.168.12.253',
'remote_ads': '192.168.12.253.1.1'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.