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

serial vs ros-noetic-rosserial

asked 2021-12-23 01:18:45 -0500

ticotico gravatar image

What is the different between these two serial packages?

Why is the one from wjwwood so popular? Under what circumstances would one prefer wjwwood's package over the official ROS package? Thx!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2021-12-23 05:12:06 -0500

gvdhoorn gravatar image

updated 2021-12-23 05:14:05 -0500

These two packages serve different goals, and cannot really be compared.

From wiki/rosserial:

rosserial is a protocol for wrapping standard ROS serialized messages and multiplexing multiple topics and services over a character device such as a serial port or network socket.

From wjwwood/serial:

This is a cross-platform library for interfacing with rs-232 serial like ports written in C++. It provides a modern C++ interface with a workflow designed to look and feel like PySerial, but with the speed and control provided by C++.

so the former is an implementation of a protocol, while the latter is a C++ library which intends to make using serial ports easier.

rosserial makes it possible for resource constraint environments (fi: micro controllers) to communicate with a regular ROS node graph (ie: roscpp / rospy based nodes), without having to run Linux.

wjwwood/serial is "simply" a serial port wrapper, it doesn't do anything but provide functions to read from and write to a serial port. What you read from or write to those serial ports (ie: the data) would not be something wjwwood/serial could help you with.

Why is the one from wjwwood so popular?

This question only makes sense if you consider the use-cases.

If you'd like to be able to have your Arduino "talk ROS" (for example), wjwwood/serial wouldn't really help much.

If you'd like to be able to read and write arbitrary binary data from/to a serial port, rosserial wouldn't really help much.

edit flag offensive delete link more

Comments

thx a lot!

ticotico gravatar image ticotico  ( 2021-12-30 15:12:32 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2021-12-23 01:18:45 -0500

Seen: 498 times

Last updated: Dec 23 '21