Ask Your Question
0

Arduino publish Odom

asked 2019-11-08 08:25:13 -0600

mateusguilherme gravatar image

updated 2019-11-08 09:03:53 -0600

Hi

Arduino MEGA 2560 can publish odometry values (nav_msgs/Odometry.msg)?

I am using an H-bridge that is connected to arduino and the arduino connected to raspberryPi. I'm using ros_serial communication between arduino and raspbery.

What is advised?

thanks

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-11-09 04:06:53 -0600

parzival gravatar image

Yes you can publish any message type from your arduino. You need to write a .ino script to do so. Make sure you include the following lines:

#include <ros.h>
#include <nav_msgs/Odometry.h>

at the top before the line

#include "Arduino.h"
edit flag offensive delete link more

Comments

I was able to implement the arduino odometry, but the rate was very low, around 8 hz. So I made arduino publish geometry_message / Twist and calculate odometry on a python node in raspberry (got rates around 100hz). I think the nav_message / Odometry message is too much for arduino to process

thanks

mateusguilherme gravatar imagemateusguilherme ( 2019-11-09 16:33:59 -0600 )edit

Yes, it is better to keep arduino scripts light, mostly for input and output, and let main computer handle the computation to be done with that data.

parzival gravatar imageparzival ( 2019-11-09 21:53:44 -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

2 followers

Stats

Asked: 2019-11-08 08:25:13 -0600

Seen: 16 times

Last updated: 2 days ago