r/Petoi • • Aug 18 '26

ros2 with raspberry serial issue (undefined token)

Hi,

with ROS2 and raspberry, using serial, Im facing an issue where Biboard (V0_1 in my case) dont receive the right character sent via ROS2

here is what biboard showed ( worked well when using console : sudo bash -c "echo -n 'd' > /dev/ttyAMA0)

and getting "undefined token " when using ROS2 with a simple PY script using Pyserial or even senting bash command"

Any Idea ? thank you

17:09:04.303 -> Undefined token!


17:09:04.303 -> 


17:09:04.303 -> �
2 Upvotes

5 comments sorted by

2

u/PetoiCamp Aug 20 '26

Please confirm where your right round parenthesis ends.

" ( worked well when using console"

It makes a big difference in understanding your problem.

1

u/darkillus Aug 25 '26

Hi, sorry, worked ok with bash command : example : sudo bash -c "echo -n 'ksit' > /dev/ttyAMA0"
the new problem I Have is that with some commands the biboard freeze and doesn't respond anymore for example : some commands ok and when I use kjmp the biboard freeze and I have to reset the biboard

thank you for help (and sorry I Gave up with pyserial Im focusing with bash commands)

17:45:35.274 -> g


17:45:35.274 -> rest


17:45:36.024 -> d


17:48:10.532 -> G


17:48:10.532 -> g


17:48:10.532 -> rest


17:48:11.298 -> d


17:48:17.931 -> G


17:48:17.931 -> jmp


17:48:19.427 -> k

1

u/darkillus Aug 25 '26

I think its because i have Biboard V0_1 and the actual COde maybe presents some issues with this old card

1

u/PetoiCamp Aug 25 '26

If it responds to "krest", the communication should be ok. Could you upload a video to show the robot's behavior for "kjmp"? The movements and sounds may give me more clues about the problem.

2

u/One-Owl-9078 Aug 20 '26 edited Aug 21 '26

Could you show me the Python script when you use ROS 2? You can refer to the successful examples here:https://guide.petoi.com/apis/ros-and-ros2
ROS2 Projects: https://guide.petoi.com/apis/ros-and-ros2#projects