Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Help Request: Subscribing to MoveIt joint_states Topic for OPCUA Server #28

Closed
acbuynak opened this issue Apr 14, 2021 · 2 comments
Closed

Comments

@acbuynak
Copy link

Hello! Working with @AustinMotz to use this metapackage and running into some issues.

Our goal is to
1 - Launch OPCUA server
2 - Connect to server
3 - Push a ROS MoveIt topic to the server

The MoveIt topic (joint_states) we are trying to publish has a more complex message type that looks like the following...

header: 
  seq: 954
  stamp: 
    secs: 1479873407
    nsecs: 957350015
  frame_id: ''
name: ['joint_s', 'joint_l', 'joint_u', 'joint_r', 'joint_b', 'joint_t']
position: [0.0, 0.1,-0.1, 0.0, 0.0, 1.1]
velocity: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
effort: []

Specifically, we are interested in the list of position values. Ideally, each being published as their own OPCUA tag.

Does anyone have any guidance on how to accomplish this?
We haven't been successful after following the tutorial and are still new to OPCUA servers as well.

Attempts Thus Far

Our first attempt was to launch the sample OPCUA server using the below command. The issue with this is that we could not read the list values from 'position'. The reported value in the OPCUA server was 0.

$ roslaunch ros_opcua_impl_python_opcua rosopcua.launch 

After some troubleshooting, we thought the next best approach would be to build off the above created OPCUA server and publish our own OPCUA tag using the ros_opcua_impl_freeopcua package OPCUA client. (Don't know how to launch OPCUA ourselves) We successfully launched the connection to the already running OPCUA server (above).

$ roslaunch ros_opcua_impl_freeopcua client.launch
$ rosservice call /opcua/opcua_client/connect "endpoint: 'opc.tcp://localhost:21554'"

... And attempted to create a new tag using the below. This is where we ran into issues.

$ rosservice call /opcua/opcua_client/subscribe "node: nodeId:'ns=2;i=/joint_states/position[1]' qualifiedName:'joint_s'  callback_topic:'joint_states'"

ERROR: Incompatible arguments to call service:
No key named [nodeId:'ns=2;i=/joint_states/position[1]' qualifiedName:'joint_s'  callback_topic:'joint_states']
Provided arguments are:
 * {'node': "nodeId:'ns=2;i=/joint_states/position[1]' qualifiedName:'joint_s'  callback_topic:'joint_states'"} (type dict)

Service arguments are: [node.nodeId node.qualifiedName callback_topic]

Any guidance?

@destogl
Copy link
Member

destogl commented Apr 15, 2021

Hi @acbuynak, thanks for your interest into library. The functionality you are searching for is implemented in #15. There you should be able to specify the exact topic or namespace to open-up through OPC UA server. On the interactive_ros there is README file with short description. Would you like to try this?

@acbuynak
Copy link
Author

Closing this issue as we were had success deploying the tool and finished the project.
Thanks for the direction!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants