ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

cannot create target when using gazebo_ros and tf2

asked 2013-10-23 09:08:27 -0600

rnunziata gravatar image

updated 2013-10-24 08:11:32 -0600

William gravatar image

I am trying to compile from source to test fix. But get error. It has to be in my CMakefile or package file. Can someone advise. Below are the files for rrbot_gazebo. There are no pgm is this dir just launch file and a world file.

# <a href="http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html">http://ros.org/doc/groovy/api/catkin/html/user_guide/supposed.html</a>
cmake_minimum_required(VERSION 2.8.3)
project(rrbot_gazebo)
# Load catkin and all dependencies required for this package
# TODO: remove all from COMPONENTS that are not catkin packages.
find_package(catkin REQUIRED COMPONENTS gazebo_ros)


# TODO: fill in what other packages will need to use this package
## DEPENDS: system dependencies of this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## INCLUDE_DIRS: 
## LIBRARIES: libraries you create in this project that dependent projects also need
catkin_package(
    DEPENDS 
    CATKIN_DEPENDS # TODO
    INCLUDE_DIRS # TODO include
    LIBRARIES # TODO
)

<package>
  <name>rrbot_gazebo</name>
  <version>0.1.0</version>
  <description>rrbot_gazebo</description>
  <maintainer <a href="mailto:email="rnunziata@yahoo.com">Richard">email="rnunziata@yahoo.com">Richard</a> Nunziata</maintainer>

  <license>BSD</license>

  <author <a href="mailto:email=email="rnunziata@yahoo.com">Richard">email=email="rnunziata@yahoo.com">Richard</a> Nunziata</author>

  <buildtool_depend>catkin</buildtool_depend>

  <run_depend>rrbot_description</run_depend>
  <run_depend>rrbot_control</run_depend> 
  <run_depend>gazebo_ros</run_depend> 

  <export>
  </export>
</package>

- Generating .msg files for action tf2_msgs/LookupTransform /home/viki/catkin_ws/src/geometry_experimental/tf2_msgs/action/LookupTransform.action
Generating for action LookupTransform
-- tf2_msgs: 9 messages, 1 services
CMake Error at /home/viki/catkin_ws/build/geometry_experimental/tf2_msgs/cmake/tf2_msgs-genmsg.cmake:89 (add_custom_target):
  add_custom_target cannot create target "tf2_msgs_generate_messages_cpp"
  because another target with the same name already exists.  The existing
  target is a custom target created in source directory
  "/home/viki/catkin_ws/src/gazebo_ros_demos/rrbot_gazebo".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  /opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:288 (include)
  geometry_experimental/tf2_msgs/CMakeLists.txt:11 (generate_messages)


CMake Error at /home/viki/catkin_ws/build/geometry_experimental/tf2_msgs/cmake/tf2_msgs-genmsg.cmake:172 (add_custom_target):
  add_custom_target cannot create target "tf2_msgs_generate_messages_lisp"
  because another target with the same name already exists.  The existing
  target is a custom target created in source directory
  "/home/viki/catkin_ws/src/gazebo_ros_demos/rrbot_gazebo".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  /opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:288 (include)
  geometry_experimental/tf2_msgs/CMakeLists.txt:11 (generate_messages)


CMake Error at /home/viki/catkin_ws/build/geometry_experimental/tf2_msgs/cmake/tf2_msgs-genmsg.cmake:255 (add_custom_target):
  add_custom_target cannot create target "tf2_msgs_generate_messages_py"
  because another target with the same name already exists.  The existing
  target is a custom target created in source directory
  "/home/viki/catkin_ws/src/gazebo_ros_demos/rrbot_gazebo".  See
  documentation for policy CMP0002 for more details.
Call Stack (most recent call first):
  /opt/ros/hydro/share/genmsg/cmake/genmsg-extras.cmake:288 (include)
  geometry_experimental/tf2_msgs/CMakeLists.txt:11 (generate_messages)
edit retag flag offensive close merge delete

Comments

I changed title, hope you don't mind

KruseT gravatar image KruseT  ( 2013-10-23 23:54:33 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2013-10-23 23:48:11 -0600

KruseT gravatar image

The bug is in either gazebo_ros, geometry_experimental, or catkin itself, but not in your code.

I mention it here https://github.com/ros/catkin/issues/539 but you might want to create a separate issue, maybe on the gazebo_ros github issue tracker. You need to mention that in order to reproduce, one needs to also place geometry_experimental in the workspace (even though your logs shows it).

One thing you can do until this is fixed is to remove geometry_experimental from your worksapce. Install it via apt_get, or install it in another workspace and chain the workspaces.

edit flag offensive delete link more

Comments

Thanks ....not sure how related to gazebo_ros I am using root package of gazebo_ros_demo which is confusing. I do have a depend on gazebo_ros but I have depends on other packages as well.

rnunziata gravatar image rnunziata  ( 2013-10-24 01:58:07 -0600 )edit

You use gazebo_ros in find_package(catkin REQUIRED COMPONENTS gazebo_ros). This command causes the error message, if you only use find_package(catkin REQUIRED), you should not have errors. However you may need gazebo_ros, depending on what you want to do.

KruseT gravatar image KruseT  ( 2013-10-24 02:40:00 -0600 )edit

thanks that worked

rnunziata gravatar image rnunziata  ( 2013-10-24 06:07:16 -0600 )edit
KruseT gravatar image KruseT  ( 2013-10-24 23:31:23 -0600 )edit

Question Tools

Stats

Asked: 2013-10-23 09:08:27 -0600

Seen: 1,811 times

Last updated: Oct 24 '13