Hello there, I'm in the process of learning gazebo. So, I'm creating a plugin to edit the cell count for the grid inside the gazebo world. When I tried to include the library of:
#include <gazebo/rendering/rendering.hh>
I always got this error message:
Errors << allocation_gazebo:make /home/mhanif/combine_ws/logs/allocation_gazebo/build.make.163.log
In file included from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/gazebo_info.h:10:0,
from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/task_gazebo.h:4,
from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/src/task_gazebo.cpp:1:
/home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/vector_angle.h:29:12: error: expected unqualified-id before numeric constant
#define PI 3.14159265
^
In file included from /usr/include/OGRE/OgreAnimable.h:33:0,
from /usr/include/OGRE/OgreAnimation.h:35,
from /usr/include/OGRE/Ogre.h:33,
from /usr/include/gazebo-9/gazebo/rendering/ogre_gazebo.h:26,
from /usr/include/gazebo-9/gazebo/rendering/Conversions.hh:25,
from /usr/include/gazebo-9/gazebo/rendering/Camera.hh:47,
from /usr/include/gazebo-9/gazebo/rendering/rendering.hh:5,
from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/gazebo_info.h:16,
from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/task_gazebo.h:4,
from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/src/task_gazebo.cpp:1:
/usr/include/OGRE/OgreVector3.h: In member function ‘Ogre::Quaternion Ogre::Vector3::getRotationTo(const Ogre::Vector3&, const Ogre::Vector3&) const’:
/usr/include/OGRE/OgreVector3.h:677:28: error: expected primary-expression before ‘(’ token
q.FromAngleAxis(Radian(Math::PI), fallbackAxis);
^
In file included from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/gazebo_info.h:10:0,
from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/task_gazebo.h:4,
from /home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/src/task_gazebo.cpp:1:
/home/mhanif/combine_ws/src/dynamic_task_allocation/src/allocation_gazebo/include/vector_angle.h:29:12: error: expected unqualified-id before numeric constant
#define PI 3.14159265
Anyone familiar with this ? Thank you very much
By the way, I'm using Gazebo 9 and ROS melodic.