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

Support to use the node under ROS Melodic #38

Open
robodyne-robotics opened this issue May 4, 2021 · 3 comments
Open

Support to use the node under ROS Melodic #38

robodyne-robotics opened this issue May 4, 2021 · 3 comments

Comments

@robodyne-robotics
Copy link

robodyne-robotics commented May 4, 2021

I was able to install the package, but I really can't understand how to use this node!

When I launch the sample.launch, I get:
setting /run_id to 5147197a-ad11-11eb-b370-001ee5df51a0
process[rosout-1]: started with pid [25615]
started core service [/rosout]
process[roscpp_azure_iothub_node-2]: started with pid [25618]
[ INFO] [1620157546.523456436]: Creating IoTHub Device handle
[ INFO] [1620157546.524714272]: connection_string: HostName=xxxxxxxx
[ INFO] [1620157546.525063374]: authentication_type:
[ INFO] [1620157546.525165938]: Using Shared Access Signatures authentication.
[ INFO] [1620157546.756376459]: The device client is connected to iothub

and nothing else happens.
How can I specify the topic that I want to send to my HUB?
There is nothing in the README file about that so I cannot understand how to proceed.

Can you please provide some instructions on how to use this node?

Thank you!
P.S. I use Ubuntu 18.04 and ROS Melodic

@ooeygui
Copy link
Member

ooeygui commented May 6, 2021

Hi there,
Thanks for your interest in the IoT Hub ROS Node.

The idea for the ROS node is that you apply configuration on the device twin, which is reflected down to the robot at a later date. This can include Dynamic Reconfigure components and topics to relay through the iothub message bus.

You can add this information to the device twin manually by accessing the twin on http://portal.azure.com, or you can use the IoT SDK from another device or service.

Inside the desired properties block, add a ros_relays object, which maps the topic to a relay method. The relay method supports both telemetry - which is sent over the message bus, or reported which applies a serialized message it as a reported item.

           "ros_relays": {
                "1": {
                    "topic": "/rosout",
                    "relay_method": "telemetry"
                },
                "2": {
                    "topic": "/initialpose",
                    "relay_method": "reported"
                }

You can also set properties down to the robot if the target ROS node implements dynamic reconfigure.

@ooeygui
Copy link
Member

ooeygui commented May 6, 2021

Is there a place in the readme where we can clarify the use?

@robodyne-robotics
Copy link
Author

I think this would help users to better understand how to use the node by reading the documentation.
However, at the end, I used the iot libraries in C to write another ROS Node to publish messages to my iot azure HUB since I wasn't able to use your ros_azure_iothub node.

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