Open surendhar091992 opened 2 years ago
Thanks for opening the issue. Did you managed to get it fixed?
No, i couldnt resolve it
Can you share the complete console output? :)
Can you share the complete console output? :)
While attempting the catkin_make as instructed by the document, it gives the fatal error of not having simulator_utils\Waypoint.h
@Qishunpeng @surendhar091992 Could you try building the simulator_utils package separately and then the whole repo?
First,
catkin build simulator_utils
Then,
catkin build
While attempting the catkin_make as instructed by the document, it gives the fatal error of not having simulator_utils\Waypoint.h
Try using catkin build
instead of catkin_make
@Qishunpeng hope this has solved your issue.
In an attempt to get things working (i have an issue/question for installing this on Ubuntu 20,04 open), I switched to trying on a ubuntu-16.04/ros-kinetic installation. This got me further, but then I this exact issue; missing Waypoint.h file. When I run the suggested step of building the simulator_utils first, I get the following error;
Errors << simulator_utils:make /home/vboxuser/Documents/catkin_ws/logs/simulator_utils/build.make.002.log
/home/vboxuser/Documents/catkin_ws/src/multi_uav_simulator/simulator_utils/src/Drone.cpp: In constructor ‘Drone::Drone(int, const ros::NodeHandle&)’:
/home/vboxuser/Documents/catkin_ws/src/multi_uav_simulator/simulator_utils/src/Drone.cpp:24:34: error: ‘to_string’ was not declared in this scope
ss << "/robot_"<<to_string(id)<<"/current_state";
^
make[2]: *** [CMakeFiles/simulator_utils.dir/src/Drone.cpp.o] Error 1
make[1]: *** [CMakeFiles/simulator_utils.dir/all] Error 2
make: *** [all] Error 2
cd /home/vboxuser/Documents/catkin_ws/build/simulator_utils; catkin build --get-env simulator_utils | catkin env -si /usr/bin/make --jobserver-fds=3,4 -j; cd -
I guess the problem is that it's trying to look for the message header whilst it is being built which is inside the same package. Typically, this goes away when you execute catkin build
for the entire workspace for a second time. That is why it worked for you the next time. If you check within the devel/ and build/ spaces you should find Waypoint.h
inside the simulator utils. But an ideal solution would be to separate the message source to a different package that would be built prior to the simulation_utils
.
But the to_string() issue is new. This should work with c++ 11, may be Ubuntu 16.04 doesn't have it enabled by default? Can you check what your c++ version is and switch the compiler?
Currently on c++ --version 5.4.0 I ran some apt updates and a dist-upgrade and reinstalled build-essentials to be sure, and its def the most 'up to date' i can get through those sources.
Sorry for not having more to give you, and that I'm clogging up your issues. Just been chasing my tail on getting this, or any UAV sims up and running.
I just do not have a machine with kinetic with me; so this would be a good build test for Ubuntu 16.04/Kinetic. Are you still getting the to_string
error?
Can you try forcing it to use c++ 11 by uncommenting this line? https://github.com/malintha/multi_uav_simulator/blob/master/simulator_utils/CMakeLists.txt#L5
Use catkin build simulator_utils
to build only the utils package.
However, I'd recommend using Ubuntu 20.04 + Noetic, that's the one I have tested this on. Referring to your previous bug (https://github.com/malintha/multi_uav_simulator/issues/14) on Noetic, did you get that one on a clean catkin_ws?
@wpower12 Alright. I did a bit of searching and apparently to_string
issue is a known bug in GCC 5.4 on Ubuntu. So it won't compile without a workaround to the code (adding D_GLIBCXX_USE_C99
to the CMakeLists.txt).
https://bugs.launchpad.net/ubuntu/+source/gcc-5/+bug/1739778
If it is the "newest" you get on Ubuntu 16.04, I would recommend you to switch to Ubuntu 20.04. So we can focus on solving https://github.com/malintha/multi_uav_simulator/issues/14.
I experienced this issue as well, and the solution of first running catkin build simulation_utils
, and then catkin build
seemed to solve this build issue for me (Ubuntu 20.04.5 with kernel 5.15.0-67-generic)
While attempting the catkin_make as instructed by the document, it gives the fatal error of not having simulator_utils\Waypoint.h