Skip to content

Commit

Permalink
Merge pull request gazebosim#2288 from azeey/6_to_7
Browse files Browse the repository at this point in the history
Merge ign-gazebo6 ➡️  gz-sim7
  • Loading branch information
azeey authored Jan 17, 2024
2 parents 926923f + 5a76b28 commit c6cd6ed
Show file tree
Hide file tree
Showing 11 changed files with 292 additions and 105 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ labels: bug
---

<!-- If you're not sure whether your problem is a bug, please ask a question at
http://answers.gazebosim.org instead.-->
https://robotics.stackexchange.com instead.-->

## Environment
* OS Version: <!-- e.g, Ubuntu 20.04 -->
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ labels: enhancement

<!-- If you're not sure on the specifics of the feature or would like a broader
discussion, please consider posting a proposal to
http://community.gazebosim.org/ instead.-->
https://robotics.stackexchange.com instead.-->

## Desired behavior
<!-- Describe the current problem and the feature you want implemented.-->
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
pull_request:
push:
branches:
- 'gz-sim7'

# Every time you make a push to your PR, it cancel immediately the previous checks,
- 'ign-gazebo[0-9]'
- 'gz-sim[0-9]?'
- 'main'
# and start a new one. The other runner will be available more quickly to your PR.
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
Expand All @@ -18,7 +18,7 @@ jobs:
name: Ubuntu Focal CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
with:
Expand All @@ -35,7 +35,7 @@ jobs:
name: Ubuntu Jammy CI
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- uses: actions/setup-python@v3
- uses: pre-commit/[email protected]
with:
Expand Down
29 changes: 29 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -887,6 +887,35 @@

## Gazebo Sim 6.x

### Gazebo Sim 6.16.0 (2024-01-12)

1. Allow using plugin file names and environment variables compatible with Garden and later
* [Pull request #2275](https://github.com/gazebosim/gz-sim/pull/2275)

1. Update friction parameters for skid steer example
* [Pull request #2235](https://github.com/gazebosim/gz-sim/pull/2235)

1. Relax pose check in actor no mesh test
* [Pull request #2196](https://github.com/gazebosim/gz-sim/pull/2196)

1. Fix macOS test failures by registering components in the core library
* [Pull request #2220](https://github.com/gazebosim/gz-sim/pull/2220)

1. Fix for sensor pointer null when navsat plugin in included in sdf
* [Pull request #2176](https://github.com/gazebosim/gz-sim/pull/2176)

1. Fix another deadlock in sensors system
* [Pull request #2200](https://github.com/gazebosim/gz-sim/pull/2200)

1. Backport component inspector Vector3d width fix
* [Pull request #2195](https://github.com/gazebosim/gz-sim/pull/2195)

1. Bump Fuel model version in test
* [Pull request #2190](https://github.com/gazebosim/gz-sim/pull/2190)

1. Infrastructure
* [Pull request #2237](https://github.com/gazebosim/gz-sim/pull/2237)
* [Pull request #2222](https://github.com/gazebosim/gz-sim/pull/2222)

### Gazebo Sim 6.15.0 (2023-08-16)

Expand Down
24 changes: 16 additions & 8 deletions examples/worlds/diff_drive_skid.sdf
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,10 @@
<surface>
<friction>
<ode>
<mu>0.5</mu>
<mu2>1.0</mu2>
<mu>1</mu>
<mu2>1</mu2>
<slip1>0.035</slip1>
<slip2>0</slip2>
<fdir1>0 0 1</fdir1>
</ode>
<bullet>
Expand Down Expand Up @@ -203,8 +205,10 @@
<surface>
<friction>
<ode>
<mu>0.5</mu>
<mu2>1.0</mu2>
<mu>1</mu>
<mu2>1</mu2>
<slip1>0.035</slip1>
<slip2>0</slip2>
<fdir1>0 0 1</fdir1>
</ode>
<bullet>
Expand Down Expand Up @@ -251,8 +255,10 @@
<surface>
<friction>
<ode>
<mu>0.5</mu>
<mu2>1.0</mu2>
<mu>1</mu>
<mu2>1</mu2>
<slip1>0.035</slip1>
<slip2>0</slip2>
<fdir1>0 0 1</fdir1>
</ode>
<bullet>
Expand Down Expand Up @@ -299,8 +305,10 @@
<surface>
<friction>
<ode>
<mu>0.5</mu>
<mu2>1.0</mu2>
<mu>1</mu>
<mu2>1</mu2>
<slip1>0.035</slip1>
<slip2>0</slip2>
<fdir1>0 0 1</fdir1>
</ode>
<bullet>
Expand Down
39 changes: 37 additions & 2 deletions src/Conversions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1377,6 +1377,41 @@ sdf::Sensor gz::sim::convert(const msgs::Sensor &_in)

out.SetCameraSensor(sensor);
}
else if (out.Type() == sdf::SensorType::GPS ||
out.Type() == sdf::SensorType::NAVSAT)
{
sdf::NavSat sensor;
if (_in.has_gps())
{
if (_in.gps().position().has_horizontal_noise())
{
sensor.SetHorizontalPositionNoise(sim::convert<sdf::Noise>(
_in.gps().position().horizontal_noise()));
}
if (_in.gps().position().has_vertical_noise())
{
sensor.SetVerticalPositionNoise(sim::convert<sdf::Noise>(
_in.gps().position().vertical_noise()));
}
if (_in.gps().velocity().has_horizontal_noise())
{
sensor.SetHorizontalVelocityNoise(sim::convert<sdf::Noise>(
_in.gps().velocity().horizontal_noise()));
}
if (_in.gps().velocity().has_vertical_noise())
{
sensor.SetVerticalVelocityNoise(sim::convert<sdf::Noise>(
_in.gps().velocity().vertical_noise()));
}
}
else
{
gzerr << "Attempting to convert a navsat sensor message, but the "
<< "message does not have a navsat nested message.\n";
}

out.SetNavSatSensor(sensor);
}
else if (out.Type() == sdf::SensorType::ALTIMETER)
{
sdf::Altimeter sensor;
Expand Down Expand Up @@ -1653,8 +1688,8 @@ msgs::ParticleEmitter gz::sim::convert(const sdf::ParticleEmitter &_in)
std::string path = asFullPath(_in.ColorRangeImage(), _in.FilePath());

common::SystemPaths systemPaths;
systemPaths.SetFilePathEnv(kResourcePathEnv);
std::string absolutePath = systemPaths.FindFile(path);
std::string absolutePath =
common::SystemPaths::LocateLocalFile(path, sim::resourcePaths());

if (!absolutePath.empty())
{
Expand Down
70 changes: 26 additions & 44 deletions src/Server_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "plugins/MockSystem.hh"
#include "../test/helpers/Relay.hh"
#include "../test/helpers/EnvTestFixture.hh"
#include "../test/helpers/Util.hh"

using namespace gz;
using namespace gz::sim;
Expand Down Expand Up @@ -277,14 +278,10 @@ TEST_P(ServerFixture, GZ_UTILS_TEST_DISABLED_ON_WIN32(ServerConfigRealPlugin))
msgs::StringMsg rep;
bool result{false};
bool executed{false};
int sleep{0};
int maxSleep{30};
while (!executed && sleep < maxSleep)
{
gzdbg << "Requesting /test/service" << std::endl;
executed = node.Request("/test/service", 100, rep, result);
sleep++;
}
const std::string service = "/test/service";
ASSERT_TRUE(test::waitForService(node, service));
gzdbg << "Requesting " << service << std::endl;
executed = node.Request(service, 1000, rep, result);
EXPECT_TRUE(executed);
EXPECT_TRUE(result);
EXPECT_EQ("TestModelSystem", rep.data());
Expand Down Expand Up @@ -336,14 +333,10 @@ TEST_P(ServerFixture,
msgs::StringMsg rep;
bool result{false};
bool executed{false};
int sleep{0};
int maxSleep{30};
while (!executed && sleep < maxSleep)
{
gzdbg << "Requesting /test/service/sensor" << std::endl;
executed = node.Request("/test/service/sensor", 100, rep, result);
sleep++;
}
const std::string service ="/test/service/sensor";
ASSERT_TRUE(test::waitForService(node, service));
gzdbg << "Requesting " << service << std::endl;
executed = node.Request(service, 1000, rep, result);
EXPECT_TRUE(executed);
EXPECT_TRUE(result);
EXPECT_EQ("TestSensorSystem", rep.data());
Expand Down Expand Up @@ -779,16 +772,12 @@ TEST_P(ServerFixture, ServerControlStop)
msgs::Boolean res;
bool result{false};
bool executed{false};
int sleep{0};
int maxSleep{30};

const std::string service = "/server_control";
ASSERT_TRUE(test::waitForService(node, service));
// first, call with stop = false; the server should keep running
while (!executed && sleep < maxSleep)
{
gzdbg << "Requesting /server_control" << std::endl;
executed = node.Request("/server_control", req, 100, res, result);
sleep++;
}
gzdbg << "Requesting " << service << std::endl;
executed = node.Request(service, req, 1000, res, result);
EXPECT_TRUE(executed);
EXPECT_TRUE(result);
EXPECT_FALSE(res.data());
Expand All @@ -801,8 +790,8 @@ TEST_P(ServerFixture, ServerControlStop)
// now call with stop = true; the server should stop
req.set_stop(true);

gzdbg << "Requesting /server_control" << std::endl;
executed = node.Request("/server_control", req, 100, res, result);
gzdbg << "Requesting " << service << std::endl;
executed = node.Request(service, req, 1000, res, result);

EXPECT_TRUE(executed);
EXPECT_TRUE(result);
Expand Down Expand Up @@ -1046,14 +1035,10 @@ TEST_P(ServerFixture, GetResourcePaths)
msgs::StringMsg_V res;
bool result{false};
bool executed{false};
int sleep{0};
int maxSleep{30};
while (!executed && sleep < maxSleep)
{
gzdbg << "Requesting /gazebo/resource_paths/get" << std::endl;
executed = node.Request("/gazebo/resource_paths/get", 100, res, result);
sleep++;
}
const std::string service = "/gazebo/resource_paths/get";
ASSERT_TRUE(test::waitForService(node, service));
gzdbg << "Requesting " << service << std::endl;
executed = node.Request(service, 1000, res, result);
EXPECT_TRUE(executed);
EXPECT_TRUE(result);
EXPECT_EQ(2, res.data_size());
Expand Down Expand Up @@ -1100,7 +1085,9 @@ TEST_P(ServerFixture, AddResourcePaths)
common::SystemPaths::Delimiter() +
std::string("/tmp/even_more"));
req.add_data("/tmp/some/path");
bool executed = node.Request("/gazebo/resource_paths/add", req);
const std::string service = "/gazebo/resource_paths/add";
ASSERT_TRUE(test::waitForService(node, service));
bool executed = node.Request(service, req);
EXPECT_TRUE(executed);

int sleep{0};
Expand Down Expand Up @@ -1154,17 +1141,12 @@ TEST_P(ServerFixture, ResolveResourcePaths)
msgs::StringMsg req, res;
bool result{false};
bool executed{false};
int sleep{0};
int maxSleep{30};

req.set_data(_uri);
while (!executed && sleep < maxSleep)
{
gzdbg << "Requesting /gazebo/resource_paths/resolve" << std::endl;
executed = node.Request("/gazebo/resource_paths/resolve", req, 100,
res, result);
sleep++;
}
const std::string service ="/gazebo/resource_paths/resolve";
ASSERT_TRUE(test::waitForService(node, service));
gzdbg << "Requesting " << service << std::endl;
executed = node.Request(service, req, 1000, res, result);
EXPECT_TRUE(executed);
EXPECT_EQ(_found, result);
EXPECT_EQ(_expected, res.data()) << "Expected[" << _expected
Expand Down
Loading

0 comments on commit c6cd6ed

Please sign in to comment.