Skip to content

Commit

Permalink
👩‍🌾 Enable Focal CI (#646)
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>

Co-authored-by: Michael Carroll <[email protected]>
  • Loading branch information
chapulina and mjcarroll authored Apr 24, 2021
1 parent 33b37c5 commit c46c69b
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 15 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ jobs:
uses: ignition-tooling/action-ignition-ci@bionic
with:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
# TODO(anyone) Enable Focal CI and fix failing tests
# focal-ci:
# runs-on: ubuntu-latest
# name: Ubuntu Focal CI
# steps:
# - name: Checkout
# uses: actions/checkout@v2
# - name: Compile and test
# id: ci
# uses: ignition-tooling/action-ignition-ci@focal
focal-ci:
runs-on: ubuntu-latest
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Compile and test
id: ci
uses: ignition-tooling/action-ignition-ci@focal
2 changes: 1 addition & 1 deletion src/ServerPrivate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ void ServerPrivate::AddRecordPlugin(const ServerConfig &_config)

// In the case that the --compress flag is set, then
// this field will be populated with just the file extension
if(_config.LogRecordCompressPath() == ".zip")
if (_config.LogRecordCompressPath() == ".zip")
{
sdfCompressPath = std::string(sdfRecordPath);
if (!std::string(1, sdfCompressPath.back()).compare(
Expand Down
6 changes: 3 additions & 3 deletions src/SimulationRunner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -864,18 +864,18 @@ void SimulationRunner::LoadLoggingPlugins(const ServerConfig &_config)
{
std::list<ServerConfig::PluginInfo> plugins;

if(_config.UseLogRecord() && !_config.LogPlaybackPath().empty())
if (_config.UseLogRecord() && !_config.LogPlaybackPath().empty())
{
ignwarn <<
"Both recording and playback are specified, defaulting to playback\n";
}

if(!_config.LogPlaybackPath().empty())
if (!_config.LogPlaybackPath().empty())
{
auto playbackPlugin = _config.LogPlaybackPlugin();
plugins.push_back(playbackPlugin);
}
else if(_config.UseLogRecord())
else if (_config.UseLogRecord())
{
auto recordPlugin = _config.LogRecordPlugin();
plugins.push_back(recordPlugin);
Expand Down
6 changes: 5 additions & 1 deletion test/integration/diff_drive_system.cc
Original file line number Diff line number Diff line change
Expand Up @@ -304,11 +304,15 @@ TEST_P(DiffDriveTest, SkidPublishCmd)
EXPECT_EQ(3u, odomPoses.size());

EXPECT_LT(poses[0].Pos().X(), poses[3999].Pos().X());
EXPECT_LT(poses[0].Pos().Y(), poses[3999].Pos().Y());
EXPECT_NEAR(poses[0].Pos().Z(), poses[3999].Pos().Z(), tol);
EXPECT_NEAR(poses[0].Rot().X(), poses[3999].Rot().X(), tol);
EXPECT_NEAR(poses[0].Rot().Y(), poses[3999].Rot().Y(), tol);

// Slip works on DART>=6.10, which isn't available on Ubuntu Focal
#ifndef __linux__
EXPECT_LT(poses[0].Pos().Y(), poses[3999].Pos().Y());
EXPECT_LT(poses[0].Rot().Z(), poses[3999].Rot().Z());
#endif
}

/////////////////////////////////////////////////
Expand Down
6 changes: 6 additions & 0 deletions test/integration/wheel_slip.cc
Original file line number Diff line number Diff line change
Expand Up @@ -554,12 +554,15 @@ TEST_F(WheelSlipTest, TricyclesUphill)
server.AddSystem(testSlipSystem.systemPtr);
server.Run(true, 2000, false);

// Slip works on DART>=6.10, which isn't available on Ubuntu Focal
#ifndef __linux__
// compute expected slip
// normal force as passed to Wheel Slip in test world
const double wheelNormalForce = 32;
const double mass = 14.5;
const double forceRatio =
(mass/2) * std::abs(gravity->Data().X()) / wheelNormalForce;
#endif
const double noSlipLinearSpeed = wheelRadius * angularSpeed;

auto wheelRearLeftVelocity =
Expand Down Expand Up @@ -590,6 +593,9 @@ TEST_F(WheelSlipTest, TricyclesUphill)

EXPECT_NEAR(angularSpeed, wheelRearLeftVelocity->Data()[0], 3e-3);
EXPECT_NEAR(angularSpeed, wheelRearRightVelocity->Data()[0], 3e-3);
// Slip works on DART>=6.10, which isn't available on Ubuntu Focal
#ifndef __linux__
EXPECT_NEAR(noSlipLinearSpeed - worldVelTrisphere1->Data()[0],
noSlipLinearSpeed * forceRatio, 5e-3);
#endif
}

0 comments on commit c46c69b

Please sign in to comment.