autowarefoundation / ros2_socketcan

A ROS2 wrapper around Linux SocketCAN
Apache License 2.0
119 stars 57 forks source link

How to getting started with ros2_socketcan? #51

Open Caracal117 opened 4 months ago

Caracal117 commented 4 months ago

Hi, I'm new to both ROS2 and Socketcan. I'm trying to use this package, built from source in ROS humble, but with the command of ros2 launch socket_can_bridge.launch.xml, the terminal output turns out to be Screenshot from 2024-07-19 15-24-36 In my system, I'm able to use can-utils to send out some simple message. Screenshot from 2024-07-19 15-57-53

Am i missing some configuration step, could you help me use this package? Thanks in advance.

Caracal117 commented 4 months ago

Update: The launch file works without warning message with vcan. Monitoring and publishing data from/to can bus seems normal with can0 as well. However, the timeout warning still exists when testing no matter how I set timeout_sec in launch file. Any suggestion?

anandadio commented 3 months ago

Any updates? i'm having the same issue

tonynajjar commented 2 months ago

Are you getting seeing data on the receiving topic? If yes then the timeouts are probably nothing to worry about. It's likely that you just don't send data fast enough on the canbus. You can confirm this by sending data at a higher rate and see if the timeout goes away, e.g. cangen can0 -g 1 -I 123 -L 8 -D i. If that's the issue then you can "supress" the warning by increasing the "receiver_interval_sec"