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

Ros serial protokoll white Microcontroller

asked 2012-08-06 10:51:45 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hi,

im using ros and it works fine. But now i will send data from AVR Microcontroller to ros. i dont use any arduino board so what is the protokoll to send data via serial port? for example to transmitt odometry data. something like that

odom/term/x/y/z/r

is this possible without rosserial_arduino?

thanks

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2012-08-06 11:57:34 -0500

rlinsalata gravatar image

There is also "regular" rosserial, along with a (generic?) rosserial_client. On the other hand, an Arduino is just an AVR microcontroller on a standard breakout board. The rosserial page also lists the general protocol, but you'll need the node running to act as a bridge between ROS and the serial connection.

edit flag offensive delete link more
0

answered 2012-08-06 18:38:27 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

ok i think the protokoll must look like: (http://www.ros.org/wiki/rosserial/Overview/Protocol) 1st Byte - Sync Flag (Value: 0xff) 2nd Byte - Sync Flag (Value: 0xff) 3rd Byte - Topic ID - Low Byte 4th Byte - Topic ID - High Byte 5th Byte - Message Length (N) - Low Byte 6th Byte - Message Length (N) - High Byte N Bytes - Serialized Message Data Byte N+7 - Checksum

but what means the -Low Byte // -High Byte?

edit flag offensive delete link more

Comments

Simply you just need to reconstruct the High and Low bytes when you receive them into one number. Assign the high byte to an int, then bit shift it left 8 places then OR with the low byte will give you orginal no.

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-08-06 21:13:17 -0500 )edit
0

answered 2012-08-09 22:23:10 -0500

PaulBouchier gravatar image

Not sure why you don't want to use Arduino - perhaps because you think that the only kind of Arduino you can get is the physical formfactor about 2" x 3" and you need something different. Here's different answer.

Dale Wheats breadboard arduino

It's a tutorial on how to make a bare AVR chip be an Arduino (not in the physical sense, with shields, but in the programmatic sense). Then rosserial_arduino will just work. I use it all the time - it works great.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-08-06 10:51:45 -0500

Seen: 262 times

Last updated: Aug 09 '12