Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-6.4'
Browse files Browse the repository at this point in the history
Conflicts:
	CHANGELOG.md
  • Loading branch information
jslee02 committed Feb 1, 2018
1 parent 443300d commit 8c5cc9e
Show file tree
Hide file tree
Showing 16 changed files with 27 additions and 17 deletions.
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@

* Misc

* Suppressed warnings: [#937](https://github.com/dartsim/dart/pull/937)
* Suppressed warnings: [#937](https://github.com/dartsim/dart/pull/937)
* Added World::create(): [#962](https://github.com/dartsim/dart/pull/962)
* Suppressed -Winjected-class-name warnings from Clang 5.0.0: [#964](https://github.com/dartsim/dart/pull/964)
* Suppressed -Wdangling-else warnings from GCC 7.2.0: [#937](https://github.com/dartsim/dart/pull/937)
* Fixed various build issues with Visual Studio: [#956](https://github.com/dartsim/dart/pull/956)

### [DART 6.3.0 (2017-10-04)](https://github.com/dartsim/dart/milestone/36?closed=1)
Expand Down
2 changes: 1 addition & 1 deletion ci/install_osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ brew install boost | grep -v '%$'
brew install eigen | grep -v '%$'
brew install tinyxml | grep -v '%$'
brew install tinyxml2 | grep -v '%$'
brew install dartsim/dart/libccd | grep -v '%$'
brew install libccd | grep -v '%$'
brew install nlopt | grep -v '%$'
brew install dartsim/dart/ipopt | grep -v '%$'
brew install ros/deps/urdfdom | grep -v '%$'
Expand Down
2 changes: 1 addition & 1 deletion dart/io/SkelParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ simulation::WorldPtr readWorld(
assert(_worldElement != nullptr);

// Create a world
simulation::WorldPtr newWorld(new simulation::World);
simulation::WorldPtr newWorld = simulation::World::create();

//--------------------------------------------------------------------------
// Load physics
Expand Down
2 changes: 1 addition & 1 deletion dart/io/sdf/SdfParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ simulation::WorldPtr readWorld(
assert(worldElement != nullptr);

// Create a world
simulation::WorldPtr newWorld(new simulation::World);
simulation::WorldPtr newWorld = simulation::World::create();

//--------------------------------------------------------------------------
// Name attribute
Expand Down
2 changes: 1 addition & 1 deletion dart/io/urdf/DartLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ simulation::WorldPtr DartLoader::parseWorldString(
return nullptr;
}

simulation::WorldPtr world(new simulation::World);
simulation::WorldPtr world = simulation::World::create();

for(std::size_t i = 0; i < worldInterface->models.size(); ++i)
{
Expand Down
8 changes: 7 additions & 1 deletion dart/simulation/World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@
namespace dart {
namespace simulation {

//==============================================================================
std::shared_ptr<World> World::create(const std::string& name)
{
return std::make_shared<World>(name);
}

//==============================================================================
World::World(const std::string& _name)
: mName(_name),
Expand Down Expand Up @@ -83,7 +89,7 @@ World::~World()
//==============================================================================
WorldPtr World::clone() const
{
WorldPtr worldClone(new World(mName));
WorldPtr worldClone = World::create(mName);

worldClone->setGravity(mGravity);
worldClone->setTimeStep(mTimeStep);
Expand Down
3 changes: 3 additions & 0 deletions dart/simulation/World.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class World : public virtual common::Subject
// Constructor and Destructor
//--------------------------------------------------------------------------

/// Creates a World
static std::shared_ptr<World> create(const std::string& name = "world");

/// Constructor
World(const std::string& _name = "world");

Expand Down
2 changes: 1 addition & 1 deletion examples/atlasSimbicon/Main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ using namespace dart::io;
int main(int argc, char* argv[])
{
// Create empty soft world
WorldPtr myWorld(new World);
WorldPtr myWorld = World::create();

// Load ground and Atlas robot and add them to the world
DartLoader urdfLoader;
Expand Down
2 changes: 1 addition & 1 deletion examples/osgExamples/osgAtlasPuppet/osgAtlasPuppet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ void enableDragAndDrops(dart::gui::osg::Viewer& viewer, const SkeletonPtr& atlas

int main()
{
WorldPtr world(new World);
WorldPtr world = World::create();

SkeletonPtr atlas = createAtlas();
world->addSkeleton(atlas);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ int main(int argc, char* argv[])
pendulum->getDof(1)->setPosition(120 * M_PI / 180.0);

// Create a world and add the pendulum to the world
WorldPtr world(new World);
WorldPtr world = World::create();
world->addSkeleton(pendulum);

// Create a window for rendering the world and handling user input
Expand Down
2 changes: 1 addition & 1 deletion tutorials/tutorialMultiPendulum/tutorialMultiPendulum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ int main(int argc, char* argv[])
pendulum->getDof(1)->setPosition(120 * M_PI / 180.0);

// Create a world and add the pendulum to the world
WorldPtr world(new World);
WorldPtr world = World::create();
world->addSkeleton(pendulum);

// Create a window for rendering the world and handling user input
Expand Down
2 changes: 1 addition & 1 deletion unittests/comprehensive/test_Building.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ TEST(BUILDING, BASIC)
joint3->setAxis(Eigen::Vector3d(1.0, 0.0, 0.0));

// World
WorldPtr world(new World);
WorldPtr world = World::create();
world->addSkeleton(skel1);

//--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion unittests/comprehensive/test_Constraint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void ConstraintTest::SingleContactTest(const std::string& /*_fileName*/)
// std::size_t testCount = 1;
#endif

WorldPtr world(new World);
WorldPtr world = World::create();
EXPECT_TRUE(world != nullptr);
world->setGravity(Vector3d(0.0, -10.00, 0.0));
world->setTimeStep(0.001);
Expand Down
2 changes: 1 addition & 1 deletion unittests/comprehensive/test_Joints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ void testServoMotor()
double insufficient_force = 1e-1;

// World
simulation::WorldPtr world(new simulation::World);
simulation::WorldPtr world = simulation::World::create();
EXPECT_TRUE(world != nullptr);

world->setGravity(Eigen::Vector3d(0, 0, -9.81));
Expand Down
2 changes: 1 addition & 1 deletion unittests/comprehensive/test_World.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ using namespace simulation;
TEST(World, AddingAndRemovingSkeletons)
{
// World
WorldPtr world(new World);
WorldPtr world = World::create();

//-------------------- Test World::removeSkeleton() ------------------------
SkeletonPtr skeleton1 = createThreeLinkRobot(Eigen::Vector3d(1.0, 1.0, 1.0),
Expand Down
4 changes: 2 additions & 2 deletions unittests/unit/test_VskParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ using namespace io;
//==============================================================================
TEST(VskParser, EmptySkeleton)
{
WorldPtr world(new World());
WorldPtr world = World::create();
EXPECT_TRUE(world != nullptr);

SkeletonPtr skeleton
Expand All @@ -67,7 +67,7 @@ TEST(VskParser, EmptySkeleton)
//==============================================================================
TEST(VskParser, SingleStepSimulations)
{
WorldPtr world(new World());
WorldPtr world = World::create();
EXPECT_NE(world , nullptr);

SkeletonPtr nick
Expand Down

0 comments on commit 8c5cc9e

Please sign in to comment.