Package/ program to run in ROS for raspberry pi of robot
I want to access usb port of raspberry pi of my robot. I have a program which is stored/run on pi of my bot and give me some values as results. How can i modify that code so that it run in my PC and access the output from USB port of pi ? I just want to access it in my PC. i am using turtlebot burger with ubuntu 16.04 and kinetic. Can i use rossserial_python for this purpose? If yes, then if you could share some example or suggest me how to use this?
Asked by enthusiast.australia on 2019-09-03 06:12:47 UTC
Answers
This is not what rosserial is designed for, you'll need to use a different approach.
The way to solve your problem using ROS is not to connect to the PIs USB port from your PC but to run a ROS node on the PI that collects the sensor data you need, then publishes via a topic to other nodes (and computers) on the network.
If you follow the python publisher tutorial you'll see how to publish data to a ROS topic. If you combine this code with the code you're using now to read data on the PI then you can publish the data on a topic to all ROS nodes.
Hope this helps.
Asked by PeteBlackerThe3rd on 2019-09-04 04:47:29 UTC
Comments
Please note a similar discussion (from the same OP) in #q332195.
Asked by gvdhoorn on 2019-09-04 05:13:27 UTC
@enthusiast.australia: please mark a question as answered by clicking the checkmark to the left of the answer.
We don't close questions here when they are answered.
Asked by gvdhoorn on 2019-09-08 10:42:48 UTC