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

how to organize my project ROS package

asked 2019-09-26 14:30:30 -0500

MjdKassem gravatar image

dear all,

i am sorry in advance for my question, but really i got confused with ROS nodes, so what i have currently is an acquisition Xmega256 board, it reads different data, ultrasonic data, GPS, and IMU with compass, then this board must send a frame with that data in known rate but the frame is raw sensor data and it needs some processing in ROS and some type of fusion Does i need to create ROS node for each sensor data? Can i create a ROS node to receive the full frame from xmega board? if yes please an example in C++ thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-09-26 17:47:51 -0500

lucascoelho gravatar image

You probably will need to communicate with this board with a serial port, so I guess it will be better to use only one node. You can read the serial port with only one process, and it will allow you to do the "fusion" more easily. If you need to publish that raw data to ROS, some of this information have messages implemented:

edit flag offensive delete link more

Comments

so you mean that i need serial node first that receive the frame and extract each sensor data, then this node should send the data to corresponding processing node, i mean (GPS node, IMU node and ultrasonic node ..) isn't it?

MjdKassem gravatar image MjdKassem  ( 2019-09-27 03:43:15 -0500 )edit

Well, I think that one node that gets the serial data, organizes the data and publishes it separately in topics, then other subsequent nodes to process the topics information would be a good design.

lucascoelho gravatar image lucascoelho  ( 2019-09-27 11:03:15 -0500 )edit

good, that means, from serial node i can publish a different messages with different types and each corresponding node will recognize the topic with the same data type

MjdKassem gravatar image MjdKassem  ( 2019-09-28 12:25:17 -0500 )edit

Yes, that should work

lucascoelho gravatar image lucascoelho  ( 2019-10-01 13:52:58 -0500 )edit

Question Tools

Stats

Asked: 2019-09-26 14:30:30 -0500

Seen: 288 times

Last updated: Sep 26 '19