ROS python/Arduino bridge under noetic

229 views
Skip to first unread message

Alan Federman

unread,
Jul 25, 2022, 9:45:06 AM7/25/22
to Camp Peavy' via HomeBrew Robotics Club
Is there some trick to getting this to work? I keep getting the waiting for topics time outs, fail to sync no matter what baud rate I try. Ivy use two different Arduinos, two USB cables, etc. 

I am wondering if it is some python2/3 issue?

I also tried getting the old ros_arduino_bridge to work, close but no cigar. 

Alan Federman

unread,
Jul 25, 2022, 9:46:40 AM7/25/22
to hbrob...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/1339371698.34637.1658756702815%40connect.xfinity.com.

Alan Federman

unread,
Jul 25, 2022, 9:47:53 AM7/25/22
to hbrob...@googlegroups.com
rosserial-python, rosserial-arduino
On 07/25/2022 6:45 AM Alan Federman <anfed...@comcast.net> wrote:


Thomas Coyle

unread,
Jul 26, 2022, 4:50:29 PM7/26/22
to HomeBrew Robotics Club
@Allan Federman,

I have rosserial-python working with an Arduino using this ros_serial_arduino_library.

However, I had to correct some of the library code based on this issue.

Hope this might give you some insights.

Regards,
TCIII

Alex Mauger

unread,
Jul 26, 2022, 4:59:03 PM7/26/22
to hbrob...@googlegroups.com
I had a bunch of issues with rosserial and ros arduino bridge. I suggest looking into pyserial.

A J

unread,
Jul 26, 2022, 8:25:01 PM7/26/22
to HomeBrew Robotics Club
I was using rosserial and had to reinstall with any earlier version on arduino.

Steve " 'dillo" Okay

unread,
Jul 27, 2022, 7:02:21 AM7/27/22
to HomeBrew Robotics Club
I think there's a good bit of bit-rot on ros-arduino-bridge in a few places and it's in need of a rewrite/refactoring.
I've tried to get it running recently with an ATMEGA2560 and VNH5019 motor controller.

I've been looking at it as a replacement for using rosserial on the Tenacity Rover. I've moved on from the L298N drivers I had initially to VNH5019 shield.
I was able to get it to command the motors,  but couldn't get any readings off the encoders, even after changing the pin assignments in the #define statements, or replacing some of the AVR macros in the .h files, but so far no joy.
I've stared at and poked & prodded at the code for a good weekend or so at this point with no success.

Part of the "magic" seems to be that driving the motors, getting encoder counts and thereby driving the internal PID loop, all rests on chip-specific AVR macros used by the ATMEGA 328P.
Those macros address certain GPIOs and certain hardware interrupts specific to the 328P. They're different on the ATMEGA168, 328, 1280 and 2560.
The README and comments in the ros-arduino-bridge code imply that you can just change some pin definitions to get it to work with other boards, but I haven't found that to be the case.

My conclusion, for the time I've had to throw at this so far, is that ros-arduino-bridge is broken out-of-the-box for pretty much anything but the Arduino UNO or other 328P boards.
It's a neat piece of software and I'm sure has helped a lot of people build a lot of robots, but it's also 10 years old and hasn't been kept up.
For my purposes, I've gone back to rosserial, warts and all,  because my project(s) need working, rolling robots.

I'm thinking seriously about writing my own bridge code, for say, the Teensy 4.1 , with its built-in Ethernet and running rosserial_tcp over that.
I've got one of these boards running the battery-monitor topics on Tenacity via rosserial_tcp and it's been pretty solid.

'dillo

Steve " 'dillo" Okay

unread,
Jul 27, 2022, 7:10:35 AM7/27/22
to HomeBrew Robotics Club
The bug you are referring to was a big problem for a while(and I've still got a copy of the rev 0.79 .zip tucked away somewhere for safe-keeping) but seems to have been fixed
in rosserial 0.9.1 under Arduino IDE 1.8.12. I accidentally "updated" my rosserial lib recently and reflexively re-compiled some code with it and was pleasantly surprised when it actually built.
You can get this inside the Arduino "Manage Libraries" Tool inside the Arduino IDE.
Thanks to Fergs for the update, as much as he keeps saying he wishes it would just die and go away :)

'dillo

A J

unread,
Jul 27, 2022, 5:12:41 PM7/27/22
to HomeBrew Robotics Club
Found an article that has some background for the Arduino serial connection. I am

using the Mega and Mx cortex to connect sensors to ROS. The cortex boards also

support the serialUSB() connections.


Marco Walther

unread,
Jul 27, 2022, 5:35:21 PM7/27/22
to hbrob...@googlegroups.com
On 7/27/22 04:02, Steve " 'dillo" Okay wrote:
> I think there's a good bit of bit-rot on ros-arduino-bridge in a few
> places and it's in need of a rewrite/refactoring.
> I've tried to get it running recently with an ATMEGA2560 and VNH5019
> motor controller.
>
> I've been looking at it as a replacement for using rosserial on the
> Tenacity Rover. I've moved on from the L298N drivers I had initially to
> VNH5019 shield.
> I was able to get it to command the motors,  but couldn't get any
> readings off the encoders, even after changing the pin assignments in
> the #define statements, or replacing some of the AVR macros in the .h
> files, but so far no joy.
> I've stared at and poked & prodded at the code for a good weekend or so
> at this point with no success.
>
> Part of the "magic" seems to be that driving the motors, getting encoder
> counts and thereby driving the internal PID loop, all rests on
> chip-specific AVR macros used by the ATMEGA 328P.
> Those macros address certain GPIOs and certain hardware interrupts
> specific to the 328P. They're different on the ATMEGA168, 328, 1280 and
> 2560.
> The README and comments in the ros-arduino-bridge code imply that you
> can just change some pin definitions to get it to work with other
> boards, but I haven't found that to be the case.
I'm running that code (somewhat modified) on a Teensy 3.? for the six
motors in my Sawppies;-) Works pretty well for me;-)

-- Marco

>
> My conclusion, for the time I've had to throw at this so far, is that
> ros-arduino-bridge is broken out-of-the-box for pretty much anything but
> the Arduino UNO or other 328P boards.
> It's a neat piece of software and I'm sure has helped a lot of people
> build a lot of robots, but it's also 10 years old and hasn't been kept up.
> For my purposes, I've gone back to rosserial, warts and all,  because my
> project(s) need working, rolling robots.
>
> I'm thinking seriously about writing my own bridge code, for say, the
> Teensy 4.1 , with its built-in Ethernet and running rosserial_tcp over
> that.
> I've got one of these boards running the battery-monitor topics on
> Tenacity via rosserial_tcp and it's been pretty solid.
>
> 'dillo
>
>
> On Monday, July 25, 2022 at 6:45:06 AM UTC-7 Alan Federman wrote:
>
> __
> Is there some trick to getting this to work? I keep getting the
> waiting for topics time outs, fail to sync no matter what baud rate
> I try. Ivy use two different Arduinos, two USB cables, etc.
>
> I am wondering if it is some python2/3 issue?
>
> I also tried getting the old ros_arduino_bridge to work, close but
> no cigar.
>
> --
> You received this message because you are subscribed to the Google
> Groups "HomeBrew Robotics Club" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to hbrobotics+...@googlegroups.com
> <mailto:hbrobotics+...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/hbrobotics/ebf117bb-976c-41ff-913a-1062a8dc8078n%40googlegroups.com
> <https://groups.google.com/d/msgid/hbrobotics/ebf117bb-976c-41ff-913a-1062a8dc8078n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Chris Albertson

unread,
Jul 30, 2022, 12:31:44 PM7/30/22
to hbrob...@googlegroups.com
Yes "bridge" has been broken and unsupported for years.  It was replaced by "ROS Serial".  ROS Seriels itself is old and in recent years was only supported on the Arduino IDE platform.   I know 100% for certain that ROS Serial works on non-AVR platforms that are suppoteded by Arduino IDE.   I'm running on a STM32. (I see no reason at all to use a 16-but AVR in a new design project)

But the above is all on "end of life" and is going away.    I would use it only if already using it on an existing project as it will not be supported going forward to new versions of system software.  But it does still work and is the only way to go on ROS1 projects.

Today in ROS2 we have Micro-ROS that runs on the microcontroller and it lets you run actual ROS nodes on the micro so there is no "bridge".

--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/ebf117bb-976c-41ff-913a-1062a8dc8078n%40googlegroups.com.


--

Chris Albertson
Redondo Beach, California
Reply all
Reply to author
Forward
0 new messages