srl-freiburg / pedsim_ros

Pedestrian simulator powered by the social force model
https://github.com/srl-freiburg/pedsim_ros
BSD 2-Clause "Simplified" License
460 stars 170 forks source link

I want to include pedsim_utils/geometry.h to my code, but I can't build it. #53

Closed takanotume24 closed 4 years ago

takanotume24 commented 4 years ago

Hi, I'm thinking that by modifying the code, like this https://github.com/srl-freiburg/pedsim_ros/compare/master...takanotume24:fix-gazebo-model-direction, we can solve the problem where the 3D model always only goes in a certain direction. However, if you try to build this code, I will get the following error.

(base) takuya@takuya-HP-Z420-Workstation:~/catkin_ws/src$ catkin build pedsim_gazebo_plugin 
-----------------------------------------------------------
Profile:                     default
Extending:             [env] /opt/ros/melodic
Workspace:                   /home/takuya/catkin_ws
-----------------------------------------------------------
Build Space:        [exists] /home/takuya/catkin_ws/build
Devel Space:        [exists] /home/takuya/catkin_ws/devel
Install Space:      [unused] /home/takuya/catkin_ws/install
Log Space:         [missing] /home/takuya/catkin_ws/logs
Source Space:       [exists] /home/takuya/catkin_ws/src
DESTDIR:            [unused] None
-----------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-----------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-----------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------
Workspace configuration appears valid.

NOTE: Forcing CMake to run for each package.
-----------------------------------------------------------
[build] Found '33' packages in 0.0 seconds.                                            
[build] Updating package table.                                                        
Starting  >>> catkin_tools_prebuild                                                    
Finished  <<< catkin_tools_prebuild                [ 2.6 seconds ]                     
Starting  >>> pedsim_msgs                                                              
Finished  <<< pedsim_msgs                          [ 5.0 seconds ]                     
Starting  >>> pedsim_utils                                                             
Finished  <<< pedsim_utils                         [ 5.0 seconds ]                     
Starting  >>> pedsim_gazebo_plugin                                                     
_______________________________________________________________________________________
Errors     << pedsim_gazebo_plugin:cmake /home/takuya/catkin_ws/logs/pedsim_gazebo_plugin/build.cmake.000.log
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindBoost.cmake:911 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "chrono" will no longer be dereferenced when the
  policy is set to NEW.  Since the policy is not set the OLD behavior will be
  used.
Call Stack (most recent call first):
  /usr/share/cmake-3.10/Modules/FindBoost.cmake:1558 (_Boost_MISSING_DEPENDENCIES)
  /usr/share/OGRE/cmake/modules/FindOGRE.cmake:318 (find_package)
  /usr/lib/x86_64-linux-gnu/cmake/gazebo/gazebo-config.cmake:175 (find_package)
  CMakeLists.txt:22 (find_package)
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:61 (add_library):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "ActorPosesPlugin" links to target "UUID::UUID" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:61 (add_library):
  Policy CMP0028 is not set: Double colon in target name means ALIAS or
  IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
  Use the cmake_policy command to set the policy and suppress this warning.

  Target "ActorPosesPlugin" links to target "UUID::UUID" but the target was
  not found.  Perhaps a find_package() call is missing for an IMPORTED
  target, or an ALIAS target is missing?
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Error at /home/takuya/catkin_ws/src/pedsim_ros/pedsim_gazebo_plugin/CMakeLists.txt:62 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:UUID::UUID,INTERFACE_INCLUDE_DIRECTORIES>

  Target "UUID::UUID" not found.

CMake Error:
  Error evaluating generator expression:

    $<TARGET_PROPERTY:UUID::UUID,INTERFACE_INCLUDE_DIRECTORIES>

  Target "UUID::UUID" not found.

CMake Error at /home/takuya/catkin_ws/src/pedsim_ros/pedsim_gazebo_plugin/CMakeLists.txt:62 (target_link_libraries):
  Error evaluating generator expression:

    $<TARGET_PROPERTY:UUID::UUID,INTERFACE_INCLUDE_DIRECTORIES>

  Target "UUID::UUID" not found.

cd /home/takuya/catkin_ws/build/pedsim_gazebo_plugin; catkin build --get-env pedsim_gazebo_plugin | catkin env -si  /usr/bin/cmake /home/takuya/catkin_ws/src/pedsim_ros/pedsim_gazebo_plugin --no-warn-unused-cli -DCATKIN_DEVEL_PREFIX=/home/takuya/catkin_ws/devel/.private/pedsim_gazebo_plugin -DCMAKE_INSTALL_PREFIX=/home/takuya/catkin_ws/install; cd -
.......................................................................................
Failed     << pedsim_gazebo_plugin:cmake           [ Exited with code 1 ]              
Failed    <<< pedsim_gazebo_plugin                 [ 5.2 seconds ]                     
[build] Summary: 3 of 4 packages succeeded.                                            
[build]   Ignored:   30 packages were skipped or are blacklisted.                      
[build]   Warnings:  None.                                                             
[build]   Abandoned: None.                                                             
[build]   Failed:    1 packages failed.                                                
[build] Runtime: 17.8 seconds total.                                                   
[build] Note: Workspace packages have changed, please re-source setup files to use them.

Where do you think I should fix it? And do you think this fix will make the model face the right way? Thank you.

takanotume24 commented 4 years ago

${GAZEBO_LIBRARIES} seems to be changed to UUID::UUID. If I remove ${GAZEBO_LIBRARIES} from target_link_libraries, I can build it, but if I remove ${GAZEBO_LIBRARIES}, my plugin won't be registered to Gazebo, right?

takanotume24 commented 4 years ago

I couldn't solve this problem, but I was able to fix the orientation of Gazebo's model. See the pull request for details.