hoverboard-robotics / hoverboard-driver

ROS hardware driver for UART-controlled hoverboard
MIT License
98 stars 54 forks source link

Error on catkin_make #1

Closed jpiat closed 4 years ago

jpiat commented 5 years ago

Hi,

trying to build the module and get :

fatal error: Stream.h: No such file or directory

any idea how to fix ? I played a bit with this code and this seemed to relate to Arduino code.

alex-makarov commented 5 years ago

@jpiat did you clone it with the submodule from my fork of bipropellant API? I've removed the original Arduino dependencies in that fork.

jpiat commented 5 years ago

I did but the submodule points to a tree that is using the Arduino code version when doing :

git submodule update --init --recursive

buraksisman commented 4 years ago

Hi Alex,

I have the same error as below:

[ 55%] Building CXX object hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/bipropellant/src/HoverboardAPI.cpp.o cc1: warning: command line option ‘-std=c++11’ is valid for C++/ObjC++ but not for C In file included from /home/fmv/catkin_ws/src/hoverboard-driver/src/bipropellant/src/HoverboardAPI.cpp:5:0: /home/fmv/catkin_ws/src/hoverboard-driver/src/bipropellant/src/HoverboardAPI.h:4:10: fatal error: Stream.h: No such file or directory

include "Stream.h"

      ^~~~~~~~~~

compilation terminated. hoverboard-driver/CMakeFiles/hoverboard_driver.dir/build.make:110: recipe for target 'hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/bipropellant/src/HoverboardAPI.cpp.o' failed make[2]: [hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/bipropellant/src/HoverboardAPI.cpp.o] Error 1 make[2]: Waiting for unfinished jobs.... In file included from /home/fmv/catkin_ws/src/hoverboard-driver/src/hoverboard.cpp:3:0: /home/fmv/catkin_ws/src/hoverboard-driver/src/bipropellant/src/HoverboardAPI.h:4:10: fatal error: Stream.h: No such file or directory

include "Stream.h"

      ^~~~~~~~~~

compilation terminated. hoverboard-driver/CMakeFiles/hoverboard_driver.dir/build.make:62: recipe for target 'hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/hoverboard.cpp.o' failed make[2]: [hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/hoverboard.cpp.o] Error 1 CMakeFiles/Makefile2:458: recipe for target 'hoverboard-driver/CMakeFiles/hoverboard_driver.dir/all' failed make[1]: [hoverboard-driver/CMakeFiles/hoverboard_driver.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

I'm using Jetson Nano. What do you suggest?

alex-makarov commented 4 years ago

Hey @buraksisman, have you cloned the repo with submodules?

git clone --recurse-submodules git@github.com:alex-makarov/hoverboard-driver.git
buraksisman commented 4 years ago

Hey @buraksisman, have you cloned the repo with submodules?

git clone --recurse-submodules git@github.com:alex-makarov/hoverboard-driver.git

Hi Alex, Thank you for your fast response.

I have this error now. Is it about compiler or what? What do you think?

Running command: "make cmake_check_build_system" in "/home/fmv/catkin_ws/build"

Running command: "make -j4 -l4" in "/home/fmv/catkin_ws/build"

[100%] Built target hoverboard_driver_gencfg [100%] Built target odom_listener [100%] Building CXX object hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/hoverboard.cpp.o In file included from /opt/ros/melodic/include/ros/serialization.h:37:0, from /opt/ros/melodic/include/ros/publisher.h:34, from /opt/ros/melodic/include/ros/node_handle.h:32, from /opt/ros/melodic/include/ros/ros.h:45, from /home/fmv/catkin_ws/src/hoverboard-driver/include/hoverboard_driver/hoverboard.h:1, from /home/fmv/catkin_ws/src/hoverboard-driver/src/hoverboard.cpp:2: /opt/ros/melodic/include/ros/message_traits.h: In instantiation of ‘static const char ros::message_traits::MD5Sum::value(const M&) [with M = double]’: /opt/ros/melodic/include/ros/message_traits.h:255:102: required from ‘const char ros::message_traits::md5sum(const M&) [with M = double]’ /opt/ros/melodic/include/ros/publisher.h:113:7: required from ‘void ros::Publisher::publish(const M&) const [with M = double]’ /home/fmv/catkin_ws/src/hoverboard-driver/src/hoverboard.cpp:122:41: required from here /opt/ros/melodic/include/ros/message_traits.h:126:14: error: request for member ‘getMD5Sum’ in ‘m’, which is of non-class type ‘const double’ return m.getMD5Sum().c_str(); ^~~~~ /opt/ros/melodic/include/ros/message_traits.h: In instantiation of ‘static const char ros::message_traits::DataType::value(const M&) [with M = double]’: /opt/ros/melodic/include/ros/message_traits.h:264:104: required from ‘const char ros::message_traits::datatype(const M&) [with M = double]’ /opt/ros/melodic/include/ros/publisher.h:113:7: required from ‘void ros::Publisher::publish(const M&) const [with M = double]’ /home/fmv/catkin_ws/src/hoverboard-driver/src/hoverboard.cpp:122:41: required from here /opt/ros/melodic/include/ros/message_traits.h:143:14: error: request for member ‘getDataType’ in ‘m’, which is of non-class type ‘const double’ return m.getDataType().c_str(); ^~~ hoverboard-driver/CMakeFiles/hoverboard_driver.dir/build.make:62: recipe for target 'hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/hoverboard.cpp.o' failed make[2]: [hoverboard-driver/CMakeFiles/hoverboard_driver.dir/src/hoverboard.cpp.o] Error 1 CMakeFiles/Makefile2:458: recipe for target 'hoverboard-driver/CMakeFiles/hoverboard_driver.dir/all' failed make[1]: [hoverboard-driver/CMakeFiles/hoverboard_driver.dir/all] Error 2 Makefile:140: recipe for target 'all' failed make: *** [all] Error 2 Invoking "make -j4 -l4" failed

alex-makarov commented 4 years ago

It seems like you cannot build ROS packages with your system, as the compiler does not understand message_traits.

buraksisman commented 4 years ago

It seems like you cannot build ROS packages with your system, as the compiler does not understand message_traits.

Still no luck.

I'm using Jetson Nano. The operating system is Ubuntu 18.04.4 its. I installed ros-melodic-desktop-full.

I've stacked on this error.

alex-makarov commented 4 years ago

@buraksisman I've just changed something, please try again.

buraksisman commented 4 years ago

@buraksisman I've just changed something, please try again.

Thank you very much.

Now it is built.

[100%] Built target hoverboard_driver

I am curious about what the problem was.

alex-makarov commented 4 years ago

Wrong payload type for joint state messages. It shouldn’t have worked even on my machine, but for some reason worked and didn’t even produce any warnings. You can check the last commit.

On Thu 26. Mar 2020 at 23:09, buraksisman notifications@github.com wrote:

@buraksisman https://github.com/buraksisman I've just changed something, please try again.

Thank you very much.

Now is is built.

[100%] Built target hoverboard_driver

I am curious about what the problem was.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/alex-makarov/hoverboard-driver/issues/1#issuecomment-604712912, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABEKATWQVNUWD42Z3LFLCA3RJPHAXANCNFSM4JF5HKUQ .