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

Package/ program to run in ROS for raspberry pi of robot

asked 2019-09-03 06:12:47 -0500

enthusiast.australia gravatar image

updated 2019-09-03 08:40:44 -0500

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?

edit retag flag offensive close merge delete

Comments

Please note a similar discussion (from the same OP) in #q332195.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-04 05:13:27 -0500 )edit

@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.

gvdhoorn gravatar image gvdhoorn  ( 2019-09-08 10:42:48 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-09-04 04:47:29 -0500

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2019-09-03 06:12:47 -0500

Seen: 400 times

Last updated: Sep 04 '19