Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
4d75304
Add a pedsim xml to occmap cpp file
ksatyaki Aug 22, 2019
4cf381a
init eloquent devel
jginesclavero Mar 4, 2020
4283ece
pedsim_msgs to ros2
jginesclavero Mar 4, 2020
3054641
Rm unussed msg
jginesclavero Mar 4, 2020
f8f10d8
pedsim_simulator migrated to ROS2 without visualization
jginesclavero Mar 27, 2020
fb7c9f3
Add parameters to control the radius of the robot and the agents
jginesclavero Mar 31, 2020
7725cd2
Update .gitignore
jginesclavero Mar 31, 2020
b212183
Fixed gazebo's 3D model shaking problem. (#52)
takanotume24 Apr 28, 2020
c5469c5
Fix gazebo model direction (#56)
takanotume24 May 15, 2020
28d930a
Restore kbd and rqt teleop to defalt launch files
makokal Jun 6, 2020
0bce71a
Update obstacle offsets
makokal Jun 8, 2020
10a9aa8
Merge branch 'master' of github.com:srl-freiburg/pedsim_ros
makokal Jun 8, 2020
ad0ab8e
Add node to spawn a single agent
jginesclavero Jul 16, 2020
45e52e6
creating a domestic scenario
jginesclavero Jul 16, 2020
2f4d470
tf2 broadcaster
jginesclavero Jul 16, 2020
9738b90
rm log
jginesclavero Jul 16, 2020
4d71394
pull from srl
ksatyaki Jul 22, 2020
7f557b1
Check NaN values
jginesclavero Aug 12, 2020
0f7c752
Add demo files
jginesclavero Aug 12, 2020
5365226
Migrate pedsim_visualizer to ROS2
jginesclavero Aug 13, 2020
66e5132
Add house demo launch
jginesclavero Aug 13, 2020
1ac7e81
Migrate pedsim_msgs to spencer_msgs in pedsim_visualizer_node
jginesclavero Aug 18, 2020
5019ec1
Update .gitmodules
jginesclavero Aug 18, 2020
e8ea988
Update .gitmodules
jginesclavero Aug 18, 2020
436f3da
Add wall_resolution param wall published once
jginesclavero Aug 18, 2020
d36191d
Update .gitmodules
jginesclavero Aug 19, 2020
1b0e9b1
Add crowd scenario
jginesclavero Nov 18, 2020
4b56c09
Merge branch 'eloquent-dev' of https://github.com/jginesclavero/pedsi…
jginesclavero Nov 18, 2020
3958b0b
Merge with ROS2
ksatyaki Apr 21, 2022
0908d2c
Stuff
ksatyaki Apr 21, 2022
fd1d05b
Optimize imports
ksatyaki Apr 21, 2022
5d00cec
Clang-format everything
ksatyaki Apr 21, 2022
a617435
Add back the gitmodules
ksatyaki Apr 21, 2022
18e684f
Fix
ksatyaki Apr 21, 2022
7527b12
Add back proper submodules
ksatyaki Apr 21, 2022
b7746dd
Update branch for submodules
ksatyaki Apr 21, 2022
2f1e444
Make previous packs work
ksatyaki Apr 21, 2022
e238f5d
More
ksatyaki Apr 27, 2022
48e21f6
Add cubicles
ksatyaki Apr 27, 2022
9d4f96b
Update the branches necessary
ksatyaki Apr 28, 2022
7192b9f
Remove spencer dependencies and integrate rviz plugin into main repo
ksatyaki Apr 28, 2022
e9c477c
Fixes
ksatyaki Apr 28, 2022
c053f0c
remove extra slash
stephenadhi Oct 30, 2022
ca7fbee
fix warning please include tf2_geometry_msgs/tf2_geometry_msgs.hpp in…
stephenadhi Oct 30, 2022
b665c33
fix typo scene loading
stephenadhi Oct 30, 2022
e029609
feature: add params.yaml to simplify parameter configuration
stephenadhi Oct 30, 2022
02761c8
ament_export_interfaces() is deprecated, use ament_export_targets() …
stephenadhi Oct 30, 2022
f2dd82b
fix gazebo launch
stephenadhi Oct 30, 2022
2e2836e
add robot spawner
stephenadhi Nov 18, 2022
5787924
add RViZ to visualize agents - work in progress
stephenadhi Nov 19, 2022
55ba6ac
add default_scene_file_path
stephenadhi Nov 20, 2022
74875b5
update RViZ: remove tfs, add wall marker
stephenadhi Nov 24, 2022
2f2c8c8
add empty.world
stephenadhi Nov 25, 2022
f266f93
gazebo_demo_launch using empty world
stephenadhi Nov 25, 2022
871e759
ignore install and log folder
stephenadhi Nov 25, 2022
50176af
spawn debug log
stephenadhi Nov 25, 2022
68ef54b
ROS2: standard rclcpp node launching
stephenadhi Nov 25, 2022
335e497
migrate parameter loading to ROS2
stephenadhi Nov 25, 2022
fe40714
add generated maps from xml scenarios
stephenadhi Jan 14, 2023
012bf30
fix node from crashing
stephenadhi Jan 17, 2023
dc66b46
add more generated maps from sample xml scenarios
stephenadhi Jan 17, 2023
b0a1a19
update ROS2 instruction
stephenadhi Jan 17, 2023
d504668
fix map origin to x_min, y_min for correct display
stephenadhi Jan 20, 2023
73fffa3
add shell script to auto generate maps from contexts
stephenadhi Jan 21, 2023
03ad135
updated map with correct origin and resolution 0.1
stephenadhi Jan 21, 2023
0167ad0
Add namespace to launch, delete duplicate files
stephenadhi Apr 20, 2023
f5c0dfe
Move .pgm map files inside maps folder
stephenadhi Apr 20, 2023
3ac64c7
Load plugin libgazebo_ros_state.so for setting the state of a spawned…
stephenadhi May 7, 2023
a6fdbad
Fix freezing issue by calling the SetEntityState gazebo service
stephenadhi May 7, 2023
b6925b4
Adjust model.sdf offset for spawning in the right orientation
stephenadhi May 7, 2023
180e0ca
Remove obsolete files
stephenadhi May 14, 2023
9775b43
Gazebo plugin: fix world generator script
stephenadhi May 14, 2023
60a0e04
Update pedsim_gazebo_plugin README.md
stephenadhi May 14, 2023
d0f9a00
Add office-cubicles example
stephenadhi May 14, 2023
5019781
Add launch argument option to run pedsim_tf2
stephenadhi Jul 15, 2023
f515c69
Issue QObject::startTimer: Timers can only be used with threads start…
stephenadhi Jul 15, 2023
80d8398
Support for custom robot frame ids
stephenadhi Jul 21, 2023
5ac4665
Script generated sample worlds from pedsim scenarios
stephenadhi Jul 21, 2023
cfb79e9
Fix bug SetEntityStete entity [n] does not exist
stephenadhi Jul 22, 2023
b8e994b
Migrate pedsim agent spawner to cpp
stephenadhi Jul 23, 2023
a81916a
Change default robot and agent parameters
stephenadhi Aug 7, 2023
8bf39fd
Update pedsim gazebo launch example using turtlebot3 house demo crowd
stephenadhi Aug 7, 2023
09cf5d4
Update Readme.md - Sample usage with Turtlebot3
stephenadhi Aug 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
.svn/*
*.pyc
build
install
log
*~
\#*#
.\#*

.vscode/
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +0,0 @@
[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
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="okal@cs.uni-freiburg.de">Billy Okal</maintainer>
<maintainer email="palmieri@cs.uni-freiburg.de">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>
37 changes: 21 additions & 16 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 Expand Up @@ -52,12 +52,13 @@ Ped::Tagent::~Tagent() {}
/// \warning Bad things will happen if the agent is not assigned to a scene. But
/// usually, Tscene takes care of that.
/// \param *s A valid Tscene initialized earlier.
void Ped::Tagent::assignScene(Ped::Tscene* sceneIn) { scene = sceneIn; }
void Ped::Tagent::assignScene(Ped::Tscene *sceneIn) { scene = sceneIn; }

void Ped::Tagent::removeAgentFromNeighbors(const Ped::Tagent* agentIn) {
void Ped::Tagent::removeAgentFromNeighbors(const Ped::Tagent *agentIn) {
// search agent in neighbors, and remove him
set<const Ped::Tagent*>::iterator foundNeighbor = neighbors.find(agentIn);
if (foundNeighbor != neighbors.end()) neighbors.erase(foundNeighbor);
set<const Ped::Tagent *>::iterator foundNeighbor = neighbors.find(agentIn);
if (foundNeighbor != neighbors.end())
neighbors.erase(foundNeighbor);
}

/// Sets the maximum velocity of an agent (vmax). Even if pushed by other
Expand Down Expand Up @@ -99,7 +100,7 @@ void Ped::Tagent::setForceFactorObstacle(double f) { forceFactorObstacle = f; }
/// \return Tvector: the calculated force
Ped::Tvector Ped::Tagent::desiredForce() {
// get destination
Twaypoint* waypoint = getCurrentWaypoint();
Twaypoint *waypoint = getCurrentWaypoint();

// if there is no destination, don't move
if (waypoint == NULL) {
Expand Down Expand Up @@ -140,9 +141,10 @@ Ped::Tvector Ped::Tagent::socialForce() const {
const double n_prime = 3;

Tvector force;
for (const Ped::Tagent* other : neighbors) {
for (const Ped::Tagent *other : neighbors) {
// don't compute social force to yourself
if (other->id == id) continue;
if (other->id == id)
continue;

// compute difference between both agents' positions
Tvector diff = other->p - p;
Expand Down Expand Up @@ -193,10 +195,10 @@ Ped::Tvector Ped::Tagent::obstacleForce() const {
Ped::Tvector minDiff;
double minDistanceSquared = INFINITY;

for (const Tobstacle* obstacle : scene->obstacles) {
for (const Tobstacle *obstacle : scene->obstacles) {
Ped::Tvector closestPoint = obstacle->closestPoint(p);
Ped::Tvector diff = p - closestPoint;
double distanceSquared = diff.lengthSquared(); // use squared distance to
double distanceSquared = diff.lengthSquared(); // use squared distance to
// avoid computing square
// root
if (distanceSquared < minDistanceSquared) {
Expand Down Expand Up @@ -229,8 +231,10 @@ void Ped::Tagent::computeForces() {

// update forces
desiredforce = desiredForce();
if (forceFactorSocial > 0) socialforce = socialForce();
if (forceFactorObstacle > 0) obstacleforce = obstacleForce();
if (forceFactorSocial > 0)
socialforce = socialForce();
if (forceFactorObstacle > 0)
obstacleforce = obstacleForce();
myforce = myForce(desiredDirection);
}

Expand All @@ -253,7 +257,8 @@ void Ped::Tagent::move(double stepSizeIn) {

// don't exceed maximal speed
double speed = v.length();
if (speed > vmax) v = v.normalized() * vmax;
if (speed > vmax)
v = v.normalized() * vmax;

// internal position update = actual move
p += stepSizeIn * v;
Expand Down
14 changes: 7 additions & 7 deletions 3rdparty/libpedsim/src/ped_angle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,28 +3,28 @@
// 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 {
bool Ped::Tangle::operator==(const Ped::Tangle &otherIn) const {
return value == otherIn.value;
}

bool Ped::Tangle::operator!=(const Ped::Tangle& otherIn) const {
bool Ped::Tangle::operator!=(const Ped::Tangle &otherIn) const {
return value != otherIn.value;
}

bool Ped::Tangle::operator<(const Ped::Tangle& otherIn) const {
bool Ped::Tangle::operator<(const Ped::Tangle &otherIn) const {
return value < otherIn.value;
}

bool Ped::Tangle::operator<=(const Ped::Tangle& otherIn) const {
bool Ped::Tangle::operator<=(const Ped::Tangle &otherIn) const {
return value <= otherIn.value;
}

bool Ped::Tangle::operator>(const Ped::Tangle& otherIn) const {
bool Ped::Tangle::operator>(const Ped::Tangle &otherIn) const {
return value > otherIn.value;
}

bool Ped::Tangle::operator>=(const Ped::Tangle& otherIn) const {
bool Ped::Tangle::operator>=(const Ped::Tangle &otherIn) const {
return value >= otherIn.value;
}
16 changes: 8 additions & 8 deletions 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 Expand Up @@ -42,7 +42,7 @@ Ped::Tobstacle::Tobstacle(double pax, double pay, double pbx, double pby) {
/// \date 2013-08-02
/// \param startIn The first corner of the obstacle.
/// \param endIn The second corner of the obstacle.
Ped::Tobstacle::Tobstacle(const Tvector& startIn, const Tvector& endIn) {
Ped::Tobstacle::Tobstacle(const Tvector &startIn, const Tvector &endIn) {
id = staticid++;
ax = startIn.x;
ay = startIn.y;
Expand Down Expand Up @@ -75,21 +75,21 @@ void Ped::Tobstacle::setPosition(double pax, double pay, double pbx,
by = pby;
}

void Ped::Tobstacle::setPosition(const Tvector& startIn, const Tvector& endIn) {
void Ped::Tobstacle::setPosition(const Tvector &startIn, const Tvector &endIn) {
setPosition(startIn.x, startIn.y, endIn.x, endIn.y);
}

void Ped::Tobstacle::setStartPoint(const Tvector& startIn) {
void Ped::Tobstacle::setStartPoint(const Tvector &startIn) {
ax = startIn.x;
ay = startIn.y;
}

void Ped::Tobstacle::setEndPoint(const Tvector& endIn) {
void Ped::Tobstacle::setEndPoint(const Tvector &endIn) {
bx = endIn.x;
by = endIn.y;
}

Ped::Tvector Ped::Tobstacle::closestPoint(const Tvector& pointIn) const {
Ped::Tvector Ped::Tobstacle::closestPoint(const Tvector &pointIn) const {
Tvector startPoint(ax, ay);
Tvector endPoint(bx, by);
Tvector relativeEndPoint = endPoint - startPoint;
Expand Down Expand Up @@ -124,8 +124,8 @@ Ped::Tvector Ped::Tobstacle::closestPoint(double p1, double p2) const {
/// \param rotationCenterIn The point the obstacle will be rotated around.
/// \param angleIn The angle the obstacle will be rotated, where phi is given
/// in radians
void Ped::Tobstacle::rotate(const Ped::Tvector& rotationCenterIn,
const Ped::Tangle& angleIn) {
void Ped::Tobstacle::rotate(const Ped::Tvector &rotationCenterIn,
const Ped::Tangle &angleIn) {
double angleValue = angleIn.toRadian();
double sinPhi = sin(angleValue);
double cosPhi = cos(angleValue);
Expand Down
Loading