Unable to compile the ROS Gazebo plugin example from the tutorial
How do you call catkin_create_pkg
to create a gazebo package? The tutorial assumes you've already created the package, and no previous tutorial goes over this. I tried adopting the CMakeLists.txt used in turtlebot_gazebo, which is simply:
cmake_minimum_required(VERSION 2.8.3)
project(myrobot_gazebo)
find_package(catkin REQUIRED)
catkin_package()
catkin_add_env_hooks(25.myrobot-gazebo SHELLS sh DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/env-hooks)
install(DIRECTORY launch
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY maps
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
install(DIRECTORY worlds
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
but running catkin_make gave me this error:
CMake Error at /opt/ros/indigo/share/catkin/cmake/catkin_add_env_hooks.cmake:93 (message):
catkin_add_env_hooks() could not find environment hook. Either
'/home/user/git/myrobot/myrobot_gazebo/env-hooks/25.myrobot-gazebo.sh',
'/home/user/git/myrobot/myrobot_gazebo/env-hooks/25.myrobot-gazebo.sh.em',
'/home/user/git/myrobot/myrobot_gazebo/env-hooks/25.myrobot-gazebo.sh.develspace.em'
or
'/home/user/git/myrobot/myrobot_gazebo/env-hooks/25.myrobot-gazebo.sh.in'
must exist.
Call Stack (most recent call first):
myrobot_gazebo/CMakeLists.txt:6 (catkin_add_env_hooks)
I'm assuming this means I'm not including some env-hook file, but that's not mentioned in the tutorial, and I can't find any documentation that explains what this does, so I don't want to just blindly add files without understanding their purpose. What's the correct way to construct a ROS Gazebo package?
Would it be helpful to add a link to the catkin_create_pkg tutorial?