Should I define ROS2Message msg type? #739
Unanswered
kumaemon0903
asked this question in
Q&A
Replies: 1 comment
-
|
Hi, thank you for your interest in rai. ROS2Message is a python class (not a ROS2 message) which allows transferring all sorts of ROS2 messages in similar API. To use it (e.g., send message) please pass it to the method with payload={} dict of your message. For example: connector.send_message(ROS2Message(payload={"data": "Hello from RAI", ...))The additional required arguments of send message are target (topic name) and msg_type e.g., "std_msgs/msg/String". Not every part of the api requires explicit message type- receive_message does not need this. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am applying RAI to my ROS robotic arm.
I have a trouble about creating my new agent.
This is the code where I have a problem.
This means this part needs a /panda_state topic in the shape of ROS2Message.
I created the python script that publishes the topic.
However, when I use connector.send_message method, it required me a message type so I tried to use ROS2Message type.
But there wasn't ROS2Message.msg file.
Should I make new ROS2Message.msg file?
Beta Was this translation helpful? Give feedback.
All reactions