Closed kadhirumasankar closed 3 years ago
It seems that an old C++ version is used to compile the code by default. The minimum version required is C++11. Maybe specifying the version explicitly can solve the problem. You can add the following code
ADD_COMPILE_OPTIONS(-std=c++11 )
ADD_COMPILE_OPTIONS(-std=c++14 )
to the CMakeLists.txt of the package _odomvisualization at line 41, like
.
Hoping this can help.
Thanks a lot! That fixed the error I was getting during catkin_make
, but when running roslaunch ego_planner rviz.launch
and roslaunch ego_planner run_in_sim.launch
, RViz opens up as it's supposed to, but I don't see the drone, or a colored visualization like in your GIF. I can still use 2D Nav Goal to publish points though. This is what I see:
I get this warning when roslaunching run_in_sim:
[odom_visualization-7] process has died [pid 7157, exit code -11, cmd /home/kadhir/catkin_ws/src/ego-planner/devel/lib/odom_visualization/odom_visualization ~odom:=/visual_slam/odom __name:=odom_visualization __log:=/home/kadhir/.ros/log/f6380648-ee48-11ea-a97a-9453307180b5/odom_visualization-7.log].
log file: /home/kadhir/.ros/log/f6380648-ee48-11ea-a97a-9453307180b5/odom_visualization-7*.log
Are you using a virtual machine? I encountered a similar error when testing in a virtual machine. What's more, it seems that package _odomvisualization, which is just for visualization(The red drone model in GIFs), has died. So if you are unable to fig it out, you can ignore this _odomvisualization package and display the position by yourself from an odometry topic.
I'm not using a virtual machine. Yes, I think you are right that the odom_visualization
package failed, that seems to be reflected in the warning I got too. Would you happen to know how to fix that? I don't have any experience with C++, so I'm not sure what to do.
The error you reported reveals nothing to the reason for the failure. Package _odomvisualization has never failed in my computer and different platforms of onboard computers on the drones. Maybe you can follow the commands
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-7 g++-7
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-7 50 --slave /usr/bin/g++ g++ /usr/bin/g++-7
to reconfigure the compiler, then delete build/ and devel/ folder and recompile the code. Hoping this helps. If you still get the same error, maybe I'm not able to provide more advice.
I ran all those steps, but I still get the same error as before saying odom_visualization
has died. Not sure what the problem is. Just to confirm, do you think you'll be to provide any more help?
I'm sorry that I can't fix the odom_visualization
error you encountered.
No worries. Thank you for your help
Hi. I cloned the repo and ran
catkin_make -DCMAKE_BUILD_TYPE=Release
. When I do that, I get the following error:How do I fix this error? I removed the code that I didn't think was relevant. Please let me know if this is sufficient information.
Edit - I am using ROS Melodic on Ubuntu 18.04