ROS4SPACE / ros2can_bridge

Bridging the CAN Bus to ROS topics based on the socketcan libraries.
Apache License 2.0
97 stars 16 forks source link

no matching funchtion for call #6

Open wangxianggang1997 opened 2 years ago

wangxianggang1997 commented 2 years ago

when I build the ros2socketcan_bridge,it occurs that /home/hk/ros2can_bridge/src/ros2socketcan_bridge/src/ros2socketcan.cpp:24:88: error: no matching function for call to ‘ros2socketcan::create_publisher(std::__cxx11::basic_stringstream::__string_type)’,I don't kown why ? could you please help me

sohamlakhi commented 2 years ago

Couple of questions: Did you selectively build just the ros2socketcan_bridge package (i.e. using colcon build --package-select ...)? If so, did you build the can_msgs package before that?

wangxianggang1997 commented 2 years ago

yes , I build the can_msgs packages success firstly by colcon build --packages-select can_msgs,then I build ros2socketcan_bridge package by colcon build --packages-select ros2socketcan_bridge but it occurs the error like Issue 6. but I don"t know why

@.***

@.*** |

---- Replied Message ---- | From | @.> | | Date | 08/09/2022 04:59 | | To | @.> | | Cc | @.**@.> | | Subject | Re: [ROS4SPACE/ros2can_bridge] no matching funchtion for call (Issue #6) |

Couple of questions: Did you selectively build just the ros2socketcan_bridge package (i.e. using colcon build --package-select ...)? If so, did you build the can_msgs package before that?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

sohamlakhi commented 2 years ago

Hey, sorry for the late reply. I have written my own implementation that works pretty well. I can share it with you if you're interested. It is a repo on my github. Let me know and I can help you build and configure it. Cheers!

whiteagle3k commented 2 years ago

Hey, sorry for the late reply. I have written my own implementation that works pretty well. I can share it with you if you're interested. It is a repo on my github. Let me know and I can help you build and configure it. Cheers!

Hello. I am interested, can you pls provide the link to your working github ?

sohamlakhi commented 2 years ago

@whiteagle3k here is the github repo: https://github.com/sohamlakhi/RpiCANprototype. If you could tell me more about your project/needs, I can tell you how to use this Cheers!

messageid commented 7 months ago

The compiler error is caused by the missing of qos parameter. I've succeful compile the code modifying the create_publisher and create_subscription like this: this->create_publisher<can_msgs::msg::Frame>(topicname_receive.str());

to this:

this->create_publisher<can_msgs::msg::Frame>(topicname_receive.str(),1);