Skip to content

Commit

Permalink
6 ➡️ 7
Browse files Browse the repository at this point in the history
Signed-off-by: Louise Poubel <[email protected]>
  • Loading branch information
chapulina committed Aug 29, 2022
2 parents c52e140 + 85bab4c commit fedca1d
Show file tree
Hide file tree
Showing 45 changed files with 1,245 additions and 1,178 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# More info:
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners

* @chapulina
* @mjcarroll
*/rendering/* @iche033
examples/* @mabelzhang
src/systems/physics/* @azeey
Expand Down
78 changes: 78 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,84 @@

## Gazebo Sim 6.x

### Gazebo Sim 6.11.0 (2022-08-17)

1. Add support for specifying log record period
* [Pull request #1636](https://github.com/gazebosim/gz-sim/pull/1636)

1. Common widget GzColor replacement
* [Pull request #1530](https://github.com/gazebosim/gz-sim/pull/1530)

1. Replace plotIcon in ComponentInspector with GzPlotIcon
* [Pull request #1638](https://github.com/gazebosim/gz-sim/pull/1638)

1. Component Inspector with common widget pose plotting
* [Pull request #1607](https://github.com/gazebosim/gz-sim/pull/1607)

1. Change CODEOWNERS and maintainer to Michael
* [Pull request #1644](https://github.com/gazebosim/gz-sim/pull/1644)

1. Replace pose in ViewAngle with GzPose
* [Pull request #1641](https://github.com/gazebosim/gz-sim/pull/1641)

1. Add system to an entity through Component Inspector
* [Pull request #1549](https://github.com/gazebosim/gz-sim/pull/1549)

1. Quick start dialog
* [Pull request #1536](https://github.com/gazebosim/gz-sim/pull/1536)
* [Pull request #1627](https://github.com/gazebosim/gz-sim/pull/1627)

1. Quiet libSDFormat console on --verbose 0
* [Pull request #1621](https://github.com/gazebosim/gz-sim/pull/1621)

1. New Apply Link Wrench system
* [Pull request #1593](https://github.com/gazebosim/gz-sim/pull/1593)

1. Add Tf publishing to AckermannSteering system
* [Pull request #1576](https://github.com/gazebosim/gz-sim/pull/1576)

1. Fix component updates
* [Pull request #1580](https://github.com/gazebosim/gz-sim/pull/1580)

1. Implement vector3 with common widget vector3
* [Pull request #1569](https://github.com/gazebosim/gz-sim/pull/1569)

1. Fix to modelphotoshoot test
* [Pull request #1570](https://github.com/gazebosim/gz-sim/pull/1570)

1. Update log playback gui config
* [Pull request #1590](https://github.com/gazebosim/gz-sim/pull/1590)

1. Helper function to get an entity from an entity message
* [Pull request #1595](https://github.com/gazebosim/gz-sim/pull/1595)

1. Fix compilation of scene broadcaster test
* [Pull request #1599](https://github.com/gazebosim/gz-sim/pull/1599)

1. Ignition -> Gazebo
* [Pull request #1596](https://github.com/gazebosim/gz-sim/pull/1596)

1. Add Model::CanonicalLink getter
* [Pull request #1594](https://github.com/gazebosim/gz-sim/pull/1594)

1. Implement Pose3d with common widget pose
* [Pull request #1571](https://github.com/gazebosim/gz-sim/pull/1571)

1. Fix UNIT_Server_TEST on Windows
* [Pull request #1577](https://github.com/gazebosim/gz-sim/pull/1577)

1. Use pytest to generate junit xml files for python tests
* [Pull request #1562](https://github.com/gazebosim/gz-sim/pull/1562)

1. Refactor: Utilizes function to load animations
* [Pull request #1568](https://github.com/gazebosim/gz-sim/pull/1568)

1. Utilizes function to sequence trajectories
* [Pull request #1565](https://github.com/gazebosim/gz-sim/pull/1565)

1. Disable MacOS flakies Citadel
* [Pull request #1545](https://github.com/gazebosim/gz-sim/pull/1545)

### Gazebo Sim 6.10.0 (2022-06-24)

1. Expose the ability to stop a server from C++
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Gazebo Sim : A Robotic Simulator

**Maintainer:** louise AT openrobotics DOT org
**Maintainer:** michael AT openrobotics DOT org

[![GitHub open issues](https://img.shields.io/github/issues-raw/gazebosim/gz-sim.svg)](https://github.com/gazebosim/gz-sim/issues)
[![GitHub open pull requests](https://img.shields.io/github/issues-pr-raw/gazebosim/gz-sim.svg)](https://github.com/gazebosim/gz-sim/pulls)
Expand Down
5 changes: 5 additions & 0 deletions include/gz/sim/EntityComponentManager.hh
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,11 @@ namespace gz
/// \return True if there are any components with one-time changes.
public: bool HasOneTimeComponentChanges() const;

/// \brief Get whether there are periodic component changes. These changes
/// may happen frequently and are processed periodically.
/// \return True if there are any components with periodic changes.
public: bool HasPeriodicComponentChanges() const;

/// \brief Get the components types that are marked as periodic changes.
/// \return All the components that at least one entity marked as
/// periodic changes.
Expand Down
9 changes: 9 additions & 0 deletions include/gz/sim/ServerConfig.hh
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,15 @@ namespace gz
/// \param[in] _recordPath Path to place recorded states
public: void SetLogRecordPath(const std::string &_recordPath);

/// \brief Get time period to record states
/// \return Time period to record states
public: std::chrono::steady_clock::duration LogRecordPeriod() const;

/// \brief Set time period to record states
/// \param[in] _period Time period to record states
public: void SetLogRecordPeriod(
const std::chrono::steady_clock::duration &_period);

/// \brief Add a topic to record.
/// \param[in] _topic Topic name, which can include wildcards.
public: void AddLogRecordTopic(const std::string &_topic);
Expand Down
6 changes: 6 additions & 0 deletions src/EntityComponentManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -977,6 +977,12 @@ bool EntityComponentManager::HasOneTimeComponentChanges() const
return !this->dataPtr->oneTimeChangedComponents.empty();
}

/////////////////////////////////////////////////
bool EntityComponentManager::HasPeriodicComponentChanges() const
{
return !this->dataPtr->periodicChangedComponents.empty();
}

/////////////////////////////////////////////////
std::unordered_set<ComponentTypeId>
EntityComponentManager::ComponentTypesWithPeriodicChanges() const
Expand Down
5 changes: 5 additions & 0 deletions src/EntityComponentManager_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2232,6 +2232,7 @@ TEST_P(EntityComponentManagerFixture,
ASSERT_NE(nullptr, c2);

EXPECT_TRUE(manager.HasOneTimeComponentChanges());
EXPECT_FALSE(manager.HasPeriodicComponentChanges());
EXPECT_EQ(0u, manager.ComponentTypesWithPeriodicChanges().size());
EXPECT_EQ(ComponentState::OneTimeChange,
manager.ComponentState(e1, c1->TypeId()));
Expand All @@ -2244,6 +2245,7 @@ TEST_P(EntityComponentManagerFixture,
// updated
manager.RunSetAllComponentsUnchanged();
EXPECT_FALSE(manager.HasOneTimeComponentChanges());
EXPECT_FALSE(manager.HasPeriodicComponentChanges());
EXPECT_EQ(0u, manager.ComponentTypesWithPeriodicChanges().size());
EXPECT_EQ(ComponentState::NoChange,
manager.ComponentState(e1, c1->TypeId()));
Expand All @@ -2258,6 +2260,7 @@ TEST_P(EntityComponentManagerFixture,
EXPECT_EQ(ComponentState::NoChange,
manager.ComponentState(e1, c1->TypeId()));
EXPECT_FALSE(manager.HasOneTimeComponentChanges());
EXPECT_FALSE(manager.HasPeriodicComponentChanges());
EXPECT_EQ(0u, manager.ComponentTypesWithPeriodicChanges().size());
EXPECT_EQ(0, manager.ChangedState().entities_size());

Expand Down Expand Up @@ -2285,6 +2288,7 @@ TEST_P(EntityComponentManagerFixture,

EXPECT_TRUE(manager.HasOneTimeComponentChanges());
// Expect a single component type to be marked as PeriodicChange
EXPECT_TRUE(manager.HasPeriodicComponentChanges());
ASSERT_EQ(1u, manager.ComponentTypesWithPeriodicChanges().size());
EXPECT_EQ(IntComponent().TypeId(),
*manager.ComponentTypesWithPeriodicChanges().begin());
Expand All @@ -2297,6 +2301,7 @@ TEST_P(EntityComponentManagerFixture,
EXPECT_TRUE(manager.RemoveComponent(e1, c1->TypeId()));

EXPECT_TRUE(manager.HasOneTimeComponentChanges());
EXPECT_FALSE(manager.HasPeriodicComponentChanges());
EXPECT_EQ(0u, manager.ComponentTypesWithPeriodicChanges().size());
EXPECT_EQ(ComponentState::NoChange,
manager.ComponentState(e1, c1->TypeId()));
Expand Down
28 changes: 28 additions & 0 deletions src/ServerConfig.cc
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ class gz::sim::ServerConfigPrivate
useLevels(_cfg->useLevels),
useLogRecord(_cfg->useLogRecord),
logRecordPath(_cfg->logRecordPath),
logRecordPeriod(_cfg->logRecordPeriod),
logPlaybackPath(_cfg->logPlaybackPath),
logRecordResources(_cfg->logRecordResources),
logRecordCompressPath(_cfg->logRecordCompressPath),
Expand Down Expand Up @@ -283,6 +284,9 @@ class gz::sim::ServerConfigPrivate
/// \brief Path to place recorded states
public: std::string logRecordPath = "";

/// \brief Time period to record states
public: std::chrono::steady_clock::duration logRecordPeriod{0};

/// \brief Path to recorded states to play back using logging system
public: std::string logPlaybackPath = "";

Expand Down Expand Up @@ -480,6 +484,19 @@ void ServerConfig::SetLogRecordPath(const std::string &_recordPath)
this->dataPtr->logRecordPath = _recordPath;
}

/////////////////////////////////////////////////
std::chrono::steady_clock::duration ServerConfig::LogRecordPeriod() const
{
return this->dataPtr->logRecordPeriod;
}

/////////////////////////////////////////////////
void ServerConfig::SetLogRecordPeriod(
const std::chrono::steady_clock::duration &_period)
{
this->dataPtr->logRecordPeriod = _period;
}

/////////////////////////////////////////////////
const std::string ServerConfig::LogPlaybackPath() const
{
Expand Down Expand Up @@ -692,6 +709,17 @@ ServerConfig::LogRecordPlugin() const
plugin.InsertContent(topicElem);
}

if (this->LogRecordPeriod() > std::chrono::steady_clock::duration::zero())
{
sdf::ElementPtr periodElem = std::make_shared<sdf::Element>();
periodElem->SetName("record_period");
periodElem->AddValue("double", "0", false, "");
double t = std::chrono::duration_cast<std::chrono::milliseconds>(
this->LogRecordPeriod()).count() * 1e-3;
periodElem->Set<double>(t);
plugin.InsertContent(periodElem);
}

gzdbg << plugin.ToElement()->ToString("") << std::endl;

return ServerConfig::PluginInfo(entityName,
Expand Down
5 changes: 5 additions & 0 deletions src/ServerConfig_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,11 @@ TEST(ServerConfig, GenerateRecordPlugin)
config.SetUseLogRecord(true);
config.SetLogRecordPath("foo/bar");
config.SetLogRecordResources(true);
auto period =
std::chrono::duration_cast<std::chrono::steady_clock::duration>(
std::chrono::duration<double>(0.04));
config.SetLogRecordPeriod(period);
EXPECT_EQ(period, config.LogRecordPeriod());

auto plugin = config.LogRecordPlugin();
EXPECT_EQ(plugin.EntityName(), "*");
Expand Down
5 changes: 5 additions & 0 deletions src/ServerPrivate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ void ServerPrivate::AddRecordPlugin(const ServerConfig &_config)
this->config.SetLogRecordPath(_config.LogRecordPath());
}

if (_config.LogRecordPeriod() > std::chrono::steady_clock::duration::zero())
{
this->config.SetLogRecordPeriod(_config.LogRecordPeriod());
}

if (_config.LogRecordResources())
this->config.SetLogRecordResources(true);

Expand Down
13 changes: 10 additions & 3 deletions src/cmd/cmdsim.rb.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,9 @@ COMMANDS = { 'sim' =>
" --record-topic /stats \ \n"\
" --record-topic /clock \n"\
"\n"\
" --record-period [arg] Specify the time period (seconds) between \n"\
" state recording. \n"\
"\n"\
" --log-overwrite When recording, overwrite existing files. \n"\
" Only valid if recording is enabled. \n"\
"\n"\
Expand Down Expand Up @@ -213,6 +216,7 @@ class Cmd
'record-path' => '',
'record-resources' => 0,
'record-topics' => [],
'record-period' => -1,
'log-overwrite' => 0,
'log-compress' => 0,
'playback' => '',
Expand Down Expand Up @@ -283,6 +287,9 @@ class Cmd
opts.on('--record-topic [arg]', String) do |t|
options['record-topics'].append(t)
end
opts.on('--record-period [arg]', Float) do |d|
options['record-period'] = d
end
opts.on('--log-overwrite') do
options['log-overwrite'] = 1
end
Expand Down Expand Up @@ -455,7 +462,7 @@ Please use [GZ_SIM_RESOURCE_PATH] instead."
const char *, int, int, const char *,
int, int, int, const char *, const char *,
const char *, const char *, const char *,
const char *, int, int)'
const char *, int, int, float)'

# Import the runGui function
Importer.extern 'int runGui(const char *, const char *, int, const char *)'
Expand Down Expand Up @@ -491,7 +498,7 @@ See https://github.com/gazebosim/gz-sim/issues/44 for more info."
options['render_engine_server'], options['render_engine_gui'],
options['file'], options['record-topics'].join(':'),
options['wait_gui'],
options['headless-rendering'])
options['headless-rendering'], options['record-period'])
end

guiPid = Process.fork do
Expand Down Expand Up @@ -528,7 +535,7 @@ See https://github.com/gazebosim/gz-sim/issues/44 for more info."
options['playback'], options['physics_engine'],
options['render_engine_server'], options['render_engine_gui'],
options['file'], options['record-topics'].join(':'),
options['wait_gui'], options['headless-rendering'])
options['wait_gui'], options['headless-rendering'], options['record-period'])
# Otherwise run the gui
else options['gui']
ENV['RMT_PORT'] = '1501'
Expand Down
1 change: 1 addition & 0 deletions src/cmd/sim.bash_completion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ GZ_SIM_COMPLETION_LIST="
--record-path
--record-resources
--record-topic
--record-period
--log-overwrite
--log-compress
--playback
Expand Down
Loading

0 comments on commit fedca1d

Please sign in to comment.