Gazebo | Ignition | Community
Ask Your Question

Diego Cubillo's profile - activity

2023-06-21 02:50:52 -0500 received badge  Popular Question (source)
2023-04-18 05:46:58 -0500 commented question Why doesn't LinearVelocity Component update?

What I'm trying is to read information, not to write it. Anyways, this is a first approximation to learn how to access c

2023-04-14 04:53:32 -0500 asked a question Why doesn't LinearVelocity Component update?

Why doesn't LinearVelocity Component update? I'm just starting with creating plugins, and I wanted to get the speed of a

2023-03-28 02:43:31 -0500 received badge  Enthusiast
2023-03-24 04:15:34 -0500 marked best answer Adding environment variable to compile transport code.

Hello,

I'm writting some piece of code to extract info from gazebo simulations, making use of a topic that is being published in transport.

My issue is, using the publisher/subscriber CMakeList.txt example file, cmake is unable to find the library file to do its job. I have no clue on which directory CMAKE_PREFIX_PATH should point to, since the only transport11 file I've found is /usr/include/ignition/transport11.

My installation is ignition Fortress from binaries in Ubuntu 20.04, and I've checked with apt that libignition-transport11-dev is installed.

The error message is as follows:

Starting >>> ros_gz_pose_transport
--- stderr: ros_gz_pose_transport                         
CMake Error at CMakeLists.txt:20 (find_package):
  By not providing "Findgz-transport11.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "gz-transport11", but CMake did not find one.

  Could not find a package configuration file provided by "gz-transport11"
  with any of the following names:

   gz-transport11Config.cmake
   gz-transport11-config.cmake

  Add the installation prefix of "gz-transport11" to CMAKE_PREFIX_PATH or set
  "gz-transport11_DIR" to a directory containing one of the above files.  If
  "gz-transport11" provides a separate development package or SDK, be sure it
  has been installed.


make: * * * [Makefile:398: cmake_check_build_system] Error 1
---
Failed   <<< ros_gz_pose_transport [2.06s, exited with code 2]

My CMakeLists.txt is:

cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)
project(ros_gz_pose_transport)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(ignition-cmake2 REQUIRED)



find_package(ignition-plugin1 REQUIRED COMPONENTS register)
set(IGN_PLUGIN_VER ${ignition-plugin1_VERSION_MAJOR})

# Find the Gazebo Transport library
find_package(gz-transport11 QUIET REQUIRED OPTIONAL_COMPONENTS log)
set(GZ_TRANSPORT_VER ${gz-transport11_VERSION_MAJOR})







find_package(ignition-gazebo6 REQUIRED)
add_library(SampleSystem SHARED src/SampleSystem.cc)
set_property(TARGET SampleSystem PROPERTY CXX_STANDARD 17)
target_link_libraries(SampleSystem
  PRIVATE ignition-plugin${IGN_PLUGIN_VER}::ignition-plugin${IGN_PLUGIN_VER}
  PRIVATE ignition-gazebo6::ignition-gazebo6
  gz-transport${GZ_TRANSPORT_VER}::core)


add_executable(pose_publisher_example src/pose_publisher_example.cpp)
ament_target_dependencies(pose_publisher_example rclcpp geometry_msgs)
add_executable(publish_once src/publish_once.cpp)
ament_target_dependencies(publish_once rclcpp geometry_msgs)
add_executable(hello src/hello_package.cpp)

target_include_directories(pose_publisher_example PUBLIC
  $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  $<INSTALL_INTERFACE:include>)
target_compile_features(pose_publisher_example PUBLIC c_std_99 cxx_std_17)  # Require C99 and C++17

install(TARGETS 
  pose_publisher_example
  hello
  publish_once
  DESTINATION lib/${PROJECT_NAME})

if(BUILD_TESTING)
  find_package(ament_lint_auto REQUIRED)
  # the following line skips the linter which checks for copyrights
  # comment the line when a copyright and license is added to all source files
  set(ament_cmake_copyright_FOUND TRUE)
  # the following line skips cpplint (only works in a git repo)
  # comment the line when this package is in a git repo and when
  # a copyright and license is added to all source files
  set(ament_cmake_cpplint_FOUND TRUE)
  ament_lint_auto_find_test_dependencies()
endif()

ament_package()

Thanks in advance, Diego

2023-03-24 04:15:34 -0500 received badge  Scholar (source)
2023-03-24 04:15:27 -0500 commented answer Adding environment variable to compile transport code.

I hadn't, and now it works. Thanks!!!

2023-03-21 02:52:41 -0500 received badge  Famous Question (source)
2023-03-21 02:52:41 -0500 received badge  Notable Question (source)
2023-03-17 08:30:19 -0500 received badge  Popular Question (source)
2023-03-17 04:16:38 -0500 commented answer Adding environment variable to compile transport code.

Hi azeey. My transport11 version is 11.4.0. Anyway, if I switch from gz- to ignition- and from GZ_ to IGN_ nothing chan

2023-03-16 10:54:02 -0500 asked a question Adding environment variable to compile transport code.

Adding environment variable to compile transport code. Hello, I'm writting some piece of code to extract info from gaze