autowarefoundation / ros2_socketcan

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

can msg has no member named 'is_rtr' or 'is_extended' or 'is_error' #33

Open Varghesemela opened 1 year ago

Varghesemela commented 1 year ago
src/ros2_socketcan/src/socket_can_receiver_node.cpp:137:15: error: ‘using Frame = struct can_msgs::msg::Frame_<std::allocator<void> >’ {aka ‘struct can_msgs::msg::Frame_<std::allocator<void> >’} has no member named ‘is_rtr’
  137 |     frame_msg.is_rtr = (receive_id.frame_type() == FrameType::REMOTE);
      |               ^~~~~~
src/ros2_socketcan/src/socket_can_receiver_node.cpp:138:15: error: ‘using Frame = struct can_msgs::msg::Frame_<std::allocator<void> >’ {aka ‘struct can_msgs::msg::Frame_<std::allocator<void> >’} has no member named ‘is_extended’
  138 |     frame_msg.is_extended = receive_id.is_extended();
      |               ^~~~~~~~~~~
src/ros2_socketcan/src/socket_can_receiver_node.cpp:139:15: error: ‘using Frame = struct can_msgs::msg::Frame_<std::allocator<void> >’ {aka ‘struct can_msgs::msg::Frame_<std::allocator<void> >’} has no member named ‘is_error’
  139 |     frame_msg.is_error = (receive_id.frame_type() == FrameType::ERROR);

When i build the package, i get the above response. I checked can_msgs and i dont see a problem there. I have just cloned the repo and built it, No changes to the code yet

Timple commented 7 months ago

Can you reproduce this?

This minimal Dockerfile works:

FROM ros:iron
SHELL [ "/bin/bash", "-c" ]
RUN apt-get update -qq && apt-get install -qqy python3-colcon-core
RUN mkdir -p /ws/src
WORKDIR /ws
RUN git clone https://github.com/autowarefoundation/ros2_socketcan /ws/src/ros2_socketcan
RUN rosdep update && rosdep install --from-paths src --ignore-src -y
RUN source /opt/ros/iron/setup.bash && colcon build