Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Eloquent dev #62

Open
wants to merge 21 commits into
base: eloquent
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ build
*~
\#*#
.\#*

.vscode/
14 changes: 8 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
[submodule "2ndparty/spencer_messages"]
path = 2ndparty/spencer_messages
url = https://github.com/spencer-project/spencer_messages.git
[submodule "2ndparty/spencer_tracking_rviz_plugin"]
path = 2ndparty/spencer_tracking_rviz_plugin
url = https://github.com/srl-freiburg/spencer_tracking_rviz_plugin.git
[submodule "2dparty/spencer_messages"]
path = 2dparty/spencer_messages
url = https://github.com/jginesclavero/spencer_messages.git
branch = eloquent-dev
[submodule "2dparty/spencer_tracking_rviz_plugin"]
path = 2dparty/spencer_tracking_rviz_plugin
url = https://github.com/jginesclavero/spencer_tracking_rviz_plugin.git
branch = eloquent-dev
1 change: 1 addition & 0 deletions 2dparty/spencer_messages
Submodule spencer_messages added at b9a95b
1 change: 1 addition & 0 deletions 2dparty/spencer_tracking_rviz_plugin
1 change: 0 additions & 1 deletion 2ndparty/spencer_messages
Submodule spencer_messages deleted from 3b392e
1 change: 0 additions & 1 deletion 2ndparty/spencer_tracking_rviz_plugin
Submodule spencer_tracking_rviz_plugin deleted from 9433aa
1 change: 0 additions & 1 deletion 3rdparty/CMakeLists.txt

This file was deleted.

39 changes: 25 additions & 14 deletions 3rdparty/libpedsim/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(pedsim)

#------------------ Configuration ------------------#
Expand All @@ -15,27 +15,21 @@ if(SHALL_DEBUG)
message("Debugging activated")
add_definitions(-O0 -DDEBUG -ggdb -g3 -rdynamic)
else(SHALL_DEBUG)
message("Debugging deactivated")
# message("Debugging deactivated")
add_definitions(-Os)
endif(SHALL_DEBUG)


find_package(catkin REQUIRED COMPONENTS
roscpp
)
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)

find_package(Boost REQUIRED)

catkin_package(
CATKIN_DEPENDS roscpp
INCLUDE_DIRS ${PROJECT_SOURCE_DIR}/include/
LIBRARIES pedsim
set(dependencies
rclcpp
)

include_directories(
${catkin_INCLUDE_DIRS}
${PROJECT_SOURCE_DIR}/include/pedsim/
${roscpp_INCLUDE_DIRS}
)
include_directories(include)

set(SOURCES
src/ped_agent.cpp
Expand All @@ -52,3 +46,20 @@ add_library(pedsim ${SOURCES})
target_link_libraries(pedsim
${BOOST_LIBRARIES}
)

install(DIRECTORY include/
DESTINATION include/
)

install(TARGETS
pedsim
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

ament_export_include_directories(include)
ament_export_libraries(pedsim)
ament_export_dependencies(${dependencies})
ament_package()

2 changes: 1 addition & 1 deletion 3rdparty/libpedsim/include/pedsim/ped_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define LIBEXPORT
#endif

#include "ped_vector.h"
#include "pedsim/ped_vector.h"

#include <deque>
#include <set>
Expand Down
8 changes: 4 additions & 4 deletions 3rdparty/libpedsim/include/pedsim/ped_includes.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#ifndef _ped_includes_h_
#define _ped_includes_h_ 1

#include "ped_agent.h"
#include "ped_obstacle.h"
#include "ped_scene.h"
#include "ped_waypoint.h"
#include "pedsim/ped_agent.h"
#include "pedsim/ped_obstacle.h"
#include "pedsim/ped_scene.h"
#include "pedsim/ped_waypoint.h"

namespace Ped {
const double LIBEXPORT LIBPEDSIM_VERSION = 2.2;
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libpedsim/include/pedsim/ped_obstacle.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define LIBEXPORT
#endif

#include "ped_vector.h"
#include "pedsim/ped_vector.h"

namespace Ped {

Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libpedsim/include/pedsim/ped_vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#endif

#include <cmath>
#include "ped_angle.h"
#include "pedsim/ped_angle.h"

namespace Ped {
/// Vector helper class. This is basically a struct with some related functions
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libpedsim/include/pedsim/ped_waypoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#endif

#include <cstddef>
#include "ped_vector.h"
#include "pedsim/ped_vector.h"

using namespace std;

Expand Down
10 changes: 6 additions & 4 deletions 3rdparty/libpedsim/package.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
<?xml version="1.0"?>
<package>
<package format ="3">
<name>pedsim</name>
<version>0.2.0</version>
<description>The pedsim package</description>
<maintainer email="[email protected]">Billy Okal</maintainer>
<maintainer email="[email protected]">Luigi Palmieri</maintainer>
<license>BSD</license>

<buildtool_depend>catkin</buildtool_depend>
<build_depend>roscpp</build_depend>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>rclcpp</depend>

<run_depend>roscpp</run_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
8 changes: 4 additions & 4 deletions 3rdparty/libpedsim/src/ped_agent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
// Copyright (c) 2003 - 20012 by Christian Gloor
//

#include "ped_agent.h"
#include "ped_obstacle.h"
#include "ped_scene.h"
#include "ped_waypoint.h"
#include "pedsim/ped_agent.h"
#include "pedsim/ped_obstacle.h"
#include "pedsim/ped_scene.h"
#include "pedsim/ped_waypoint.h"

#include <algorithm>
#include <cmath>
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libpedsim/src/ped_angle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright (c) 2003 - 2012 by Christian Gloor
//

#include "ped_angle.h"
#include "pedsim/ped_angle.h"

bool Ped::Tangle::operator==(const Ped::Tangle& otherIn) const {
return value == otherIn.value;
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libpedsim/src/ped_obstacle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright (c) 2003 - 2012 by Christian Gloor
//

#include "ped_obstacle.h"
#include "pedsim/ped_obstacle.h"

#include <cmath>
#include <vector>
Expand Down
10 changes: 5 additions & 5 deletions 3rdparty/libpedsim/src/ped_scene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
// Copyright (c) 2003 - 2012 by Christian Gloor
//

#include "ped_scene.h"
#include "ped_agent.h"
#include "ped_obstacle.h"
#include "ped_tree.h"
#include "ped_waypoint.h"
#include "pedsim/ped_scene.h"
#include "pedsim/ped_agent.h"
#include "pedsim/ped_obstacle.h"
#include "pedsim/ped_tree.h"
#include "pedsim/ped_waypoint.h"

#include <algorithm>
#include <cstddef>
Expand Down
6 changes: 3 additions & 3 deletions 3rdparty/libpedsim/src/ped_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
// Copyright (c) 2003 - 2004 by Christian Gloor
//

#include "ped_tree.h"
#include "ped_agent.h"
#include "ped_scene.h"
#include "pedsim/ped_tree.h"
#include "pedsim/ped_agent.h"
#include "pedsim/ped_scene.h"

#include <cassert>
#include <cstddef>
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/libpedsim/src/ped_vector.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright (c) 2003 - 2012 by Christian Gloor
//

#include "ped_vector.h"
#include "pedsim/ped_vector.h"

/// Default constructor, which makes sure that all the values are set to 0.
Ped::Tvector::Tvector() : x(0), y(0), z(0) {}
Expand Down
4 changes: 2 additions & 2 deletions 3rdparty/libpedsim/src/ped_waypoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
// Copyright (c) 2003 - 2012 by Christian Gloor
//

#include "ped_waypoint.h"
#include "ped_agent.h"
#include "pedsim/ped_waypoint.h"
#include "pedsim/ped_agent.h"

// initialize static variables
int Ped::Twaypoint::staticid = 0;
Expand Down
135 changes: 81 additions & 54 deletions pedsim_gazebo_plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,67 +1,94 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(pedsim_gazebo_plugin)

## Compile as C++11, supported in ROS Kinetic and newer
add_compile_options(-std=c++11)

## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
gazebo_ros
geometry_msgs
roscpp
rospy
gazebo_msgs
pedsim_msgs
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# we dont use add_compile_options with pedantic in message packages
# because the Python C extensions dont comply with it
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
endif()

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(gazebo_dev REQUIRED)
find_package(gazebo_ros REQUIRED)
find_package(gazebo_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(pedsim_msgs REQUIRED)
find_package(tf2 REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(rcl REQUIRED)
find_package(rclcpp REQUIRED)

include_directories(include
${gazebo_dev_INCLUDE_DIRS}
${gazebo_ros_INCLUDE_DIRS}
${geometry_msgs_INCLUDE_DIRS}
${pedsim_msgs_INCLUDE_DIRS}
${tf2_INCLUDE_DIRS}
)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(gazebo REQUIRED )
link_directories(${GAZEBO_LIBRARY_DIRS})
link_directories(${gazebo_dev_LIBRARY_DIRS})


################################################
## Declare ROS messages, services and actions ##
################################################
ament_python_install_package(scripts/)



################################################
## Declare ROS dynamic reconfigure parameters ##
################################################


###################################
## catkin specific configuration ##
###################################

catkin_package(
# INCLUDE_DIRS include
# LIBRARIES gzb_vel_plugin
CATKIN_DEPENDS gazebo_ros roscpp geometry_msgs pedsim_msgs
# DEPENDS system_lib
# ActorPosesPlugin
add_library(gazebo_ros_actor_poses SHARED
src/actor_poses_plugin.cpp
)

###########
## Build ##
###########

## Specify additional locations of header files
## Your package locations should be listed before other locations
include_directories(
include
${catkin_INCLUDE_DIRS}
${GAZEBO_INCLUDE_DIRS}
ament_target_dependencies(gazebo_ros_actor_poses
"gazebo_dev"
"gazebo_ros"
"rclcpp"
"pedsim_msgs"
"tf2"
"tf2_geometry_msgs"
)
ament_export_libraries(gazebo_ros_actor_poses)

ament_export_dependencies(rclcpp)
ament_export_dependencies(gazebo_dev)
ament_export_dependencies(gazebo_msgs)
ament_export_dependencies(gazebo_ros)
ament_export_dependencies(pedsim_msgs)

if(NOT WIN32)
if(NOT APPLE)
set(
AMENT_CMAKE_ENVIRONMENT_HOOKS_DESC_gazebo_plugins
"prepend-non-duplicate;LD_LIBRARY_PATH;${GAZEBO_PLUGIN_PATH}")
else()
set(
AMENT_CMAKE_ENVIRONMENT_HOOKS_DESC_gazebo_plugins
"prepend-non-duplicate;DYLD_LIBRARY_PATH;${GAZEBO_PLUGIN_PATH}")
endif()
endif()
ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/gazebo_plugins.sh.in")

ament_package()


install(
PROGRAMS
scripts/pedsim_to_gazebo_world.py
scripts/spawn_pedsim_agents.py
scripts/spawn_single_agent.py
DESTINATION lib/${PROJECT_NAME}/
)

install(
TARGETS
gazebo_ros_actor_poses
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)

add_library(ActorPosesPlugin src/actor_poses_plugin.cpp)
target_link_libraries(ActorPosesPlugin ${catkin_LIBRARIES} ${GAZEBO_LIBRARIES})


#############
## Install ##
#############
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}/)
install(DIRECTORY worlds DESTINATION share/${PROJECT_NAME})
install(DIRECTORY models DESTINATION share/${PROJECT_NAME})

Loading