Ask Your Question
0

how to organize my project ROS package

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

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 -0600

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 imageMjdKassem ( 2019-09-27 03:43:15 -0600 )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 imagelucascoelho ( 2019-09-27 11:03:15 -0600 )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 imageMjdKassem ( 2019-09-28 12:25:17 -0600 )edit

Yes, that should work

lucascoelho gravatar imagelucascoelho ( 2019-10-01 13:52:58 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 39 times

Last updated: Sep 26