ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

ROS detection Arduino

asked 2022-03-23 13:21:48 -0500

bir gravatar image

Is it possible to get an Arduino to do its tasks until ROS is connected? Once ROS is connected change its tasks. I am unable to find any way to detect ROS connection. I have seen similar questions where people are trying to figure out if ROS is connected. The common method seems to be using "ros/master" and "rosgraph", neither are usable in Arduino.

Is there a way to get Arduino to detect ROS without the above-mentioned methods? Thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2022-03-25 11:12:52 -0500

miura gravatar image

Can I connect an Arudino to a laptop and run it? ( I have ROS running on my laptop. )

In that case, we believe that the rosserial package can be used to achieve this. After starting ROS, it sends a topic to Arudino indicating that it has connected to Arudino; Arudino subscribes to the topic and switches the flag in the callback.

If you switch tasks according to that flag, haven't you done what you wanted to do?

ref: https://wiki.ros.org/rosserial/Tutorials

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-03-23 13:21:48 -0500

Seen: 94 times

Last updated: Mar 25 '22