yoneken / rosserial_stm32

This is a part of [rosserial](https://github.com/ros-drivers/rosserial) repository to communicate with ROS system through a USART for STM32 embedded system.
BSD 2-Clause "Simplified" License
227 stars 72 forks source link

Topics are not being seen by ROS #21

Open Abo3abed opened 4 years ago

Abo3abed commented 4 years ago

Hey! I'm using your 'chatter' example to perform a simple publisher program, and after setting up the communication everything works fine except for the topic 'chatter' it's not being seen even when using 'rostopic list'. can you please tell why this is happening? thanks in advance

yoneken commented 4 years ago

Hi, You have to launch _rosserialpython to subscribe to topics from embedded devices.

Abo3abed commented 4 years ago

Thank you for your time! But when I run rosserial_python serial_node.py _port:= _baud:= it gives me an error! [ERROR] [1585574845.599400]: Unable to sync with device; possible link problem or link software version mismatch such as hydro rosserial_python with groovy Arduino

Do I have to add the stm32 project to CmakeList.txt or package.xml ? or even to have it inside the ros package workspace ? Note: I'm using ros-melodic

5730289021-NN commented 4 years ago

I used to get that error and I fixed that by correcting the argument _baud in rosserial_python serial_node.py _port:= _baud:= to match the actual USART2 baudrate

yoneken commented 4 years ago

Thank you for your helpful advice! Yes. You have to direct your actual device with the arguments. something like,

rosserial_python serial_node.py _port:=/dev/ttyACM0 _baud:=38400

Actually, the default baudrate of rosserial is 38400.