Skip to content

Commit

Permalink
* Updated GAMS repo to style guide
Browse files Browse the repository at this point in the history
* Updated follow capabilities in the Greet algorithm
* Updated demo scripts for the Greet algorithm
* Removed bazel build files from GAMS
  • Loading branch information
jredmondson committed Mar 19, 2019
1 parent 60aed19 commit 8fcb0f9
Show file tree
Hide file tree
Showing 247 changed files with 7,724 additions and 8,101 deletions.
128 changes: 0 additions & 128 deletions BUILD

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/simulation/unreal/greet/greet.mf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
.id >= .targets => (
!.origin => (.origin = [10, .id * 10, 20]);
!.guard => (.guard = [0, .id * 10, 10]);
!.distance => (.distance = 40);
!.distance => (.distance = 30);
!.initial_pose => (.initial_pose = .origin);
!.targets => (.targets = 1);

Expand Down
4 changes: 3 additions & 1 deletion scripts/simulation/unreal/greet/greet_and_follow.mf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
.id >= .targets => (
!.origin => (.origin = [10, .id * 10, 20]);
!.guard => (.guard = [0, .id * 10, 10]);
!.distance => (.distance = 40);
!.distance => (.distance = 30);
!.max_distance => (.max_distance = 40);
!.initial_pose => (.initial_pose = .origin);
!.targets => (.targets = 1);
!.followers => (.followers = 2);
Expand All @@ -38,5 +39,6 @@
{.prefix}.algorithm.args.home.location=.origin;
{.prefix}.algorithm.args.guard.distance=.distance;
{.prefix}.algorithm.args.guard.location=.guard;
{.prefix}.algorithm.args.guard.max_follow_distance=.max_distance;
{.prefix}.algorithm.args.follow.max_agents=.followers;
);
2 changes: 1 addition & 1 deletion scripts/simulation/unreal/greet/run_greet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ NT=0
TARGETS=1
SCRIPTS_DIR=`dirname $0`
SCRIPT="$SCRIPTS_DIR/greet.mf"
LOG_LEVEL=4
LOG_LEVEL=1

if [ $# -ge 1 ]; then
if [ "$1" == "help" ] || [ "$1" == "-h" ]; then
Expand Down
2 changes: 1 addition & 1 deletion scripts/simulation/unreal/greet/run_greet_and_follow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ NT=0
TARGETS=1
SCRIPTS_DIR=`dirname $0`
SCRIPT="$SCRIPTS_DIR/greet_and_follow.mf"
LOG_LEVEL=4
LOG_LEVEL=1

if [ $# -ge 1 ]; then
if [ "$1" == "help" ] || [ "$1" == "-h" ]; then
Expand Down
18 changes: 9 additions & 9 deletions src/gams/algorithms/AlgorithmFactory.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014 Carnegie Mellon University. All Rights Reserved.
* Copyright(c) 2014 Carnegie Mellon University. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -51,42 +51,42 @@
using std::cerr;
using std::endl;

gams::algorithms::AlgorithmFactory::AlgorithmFactory ()
: knowledge_ (0), agents_ (0), platform_ (0), self_ (0), sensors_ (0)
gams::algorithms::AlgorithmFactory::AlgorithmFactory()
: knowledge_(0), agents_(0), platform_(0), self_(0), sensors_(0)
{
}

gams::algorithms::AlgorithmFactory::~AlgorithmFactory ()
gams::algorithms::AlgorithmFactory::~AlgorithmFactory()
{
}

void
gams::algorithms::AlgorithmFactory::set_agents (variables::Agents * agents)
gams::algorithms::AlgorithmFactory::set_agents(variables::Agents * agents)
{
agents_ = agents;
}

void
gams::algorithms::AlgorithmFactory::set_knowledge (
gams::algorithms::AlgorithmFactory::set_knowledge(
madara::knowledge::KnowledgeBase * knowledge)
{
knowledge_ = knowledge;
}

void
gams::algorithms::AlgorithmFactory::set_platform (platforms::BasePlatform * platform)
gams::algorithms::AlgorithmFactory::set_platform(platforms::BasePlatform * platform)
{
platform_ = platform;
}

void
gams::algorithms::AlgorithmFactory::set_self (variables::Self * self)
gams::algorithms::AlgorithmFactory::set_self(variables::Self * self)
{
self_ = self;
}

void
gams::algorithms::AlgorithmFactory::set_sensors (variables::Sensors * sensors)
gams::algorithms::AlgorithmFactory::set_sensors(variables::Sensors * sensors)
{
sensors_ = sensors;
}
18 changes: 9 additions & 9 deletions src/gams/algorithms/AlgorithmFactory.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* Copyright (c) 2014 Carnegie Mellon University. All Rights Reserved.
* Copyright(c) 2014 Carnegie Mellon University. All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
Expand Down Expand Up @@ -75,12 +75,12 @@ namespace gams
/**
* Constructor
**/
AlgorithmFactory ();
AlgorithmFactory();

/**
* Destructor
**/
virtual ~AlgorithmFactory ();
virtual ~AlgorithmFactory();

/**
* Creates an algorithm
Expand All @@ -92,7 +92,7 @@ namespace gams
* @param agents list of agents in the swarm
* @return the new algorithm
**/
virtual BaseAlgorithm * create (
virtual BaseAlgorithm * create(
const madara::knowledge::KnowledgeMap & args,
madara::knowledge::KnowledgeBase * knowledge,
platforms::BasePlatform * platform,
Expand All @@ -104,31 +104,31 @@ namespace gams
* Sets list of agents participating in swarm
* @param agents agents in the swarm
**/
void set_agents (variables::Agents * agents);
void set_agents(variables::Agents * agents);

/**
* Sets the knowledge base
* @param knowledge the knowledge base to use
**/
void set_knowledge (madara::knowledge::KnowledgeBase * knowledge);
void set_knowledge(madara::knowledge::KnowledgeBase * knowledge);

/**
* Sets the map of platform names to platform information
* @param platform the platform to use
**/
void set_platform (platforms::BasePlatform * platform);
void set_platform(platforms::BasePlatform * platform);

/**
* Sets self-referencing variables
* @param self self-referencing variables
**/
void set_self (variables::Self * self);
void set_self(variables::Self * self);

/**
* Sets the map of sensor names to sensor information
* @param sensors map of sensor names to sensor information
**/
void set_sensors (variables::Sensors * sensors);
void set_sensors(variables::Sensors * sensors);

protected:

Expand Down
Loading

0 comments on commit 8fcb0f9

Please # to comment.