Skip to content

Commit

Permalink
Fix merge
Browse files Browse the repository at this point in the history
Signed-off-by: Michael X. Grey <mxgrey@intrinsic.ai>
  • Loading branch information
mxgrey committed Jun 5, 2024
2 parents 57f33c6 + 27aa2c7 commit 64d2945
Show file tree
Hide file tree
Showing 28 changed files with 157 additions and 177 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/asan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: asan

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
asan_test:
name: rmf_traffic_editor asan
uses: open-rmf/rmf_ci_templates/.github/workflows/reusable_build.yaml@main
with:
dist-matrix: |
[{"ros_distribution": "humble",
"ubuntu_distribution": "jammy"}]
# NOTE: Avoid adding comments in the package lines, this can break some of the called scripts in github actions
packages: |
rmf_traffic_editor
rmf_traffic_editor_test_maps
mixin: asan

21 changes: 21 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: build
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: '0 0 1 * *'

jobs:
build_and_test:
name: rmf_traffic_editor
uses: open-rmf/rmf_ci_templates/.github/workflows/reusable_build.yaml@main
with:
# NOTE: Avoid adding comments in the package lines, this can break some of the called scripts in github actions
# Assets containing no tests caused a build failure in buildfarm, add as a regression test https://github.com/open-rmf/rmf_traffic_editor/pull/495
packages: |
rmf_traffic_editor
rmf_traffic_editor_assets
rmf_traffic_editor_test_maps
49 changes: 0 additions & 49 deletions .github/workflows/ci.yaml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/ci_rolling.yaml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/tsan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: tsan

on:
pull_request:
push:
branches:
- main
workflow_dispatch:

jobs:
tsan_test:
name: rmf_traffic_editor tsan
uses: open-rmf/rmf_ci_templates/.github/workflows/reusable_build.yaml@main
with:
dist-matrix: |
[{"ros_distribution": "humble",
"ubuntu_distribution": "jammy"}]
# NOTE: Avoid adding comments in the package lines, this can break some of the called scripts in github actions
packages: |
rmf_traffic_editor
rmf_traffic_editor_test_maps
mixin: tsan

10 changes: 10 additions & 0 deletions rmf_building_map_tools/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@
Changelog for package rmf\_building\_map\_tools
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.9.0 (2024-06-01)
------------------
* Fix MultiPolygon not iterable (`#496 <https://github.com/open-rmf/rmf_traffic_editor/pull/496>`_)
* Harmonic release and ECS refactor (`#483 <https://github.com/open-rmf/rmf_traffic_editor/pull/483>`_)
* workaround fuel dup (`#490 <https://github.com/open-rmf/rmf_traffic_editor/pull/490>`_)
* Add per_page arg to fuel pagination for pit_crew (`#491 <https://github.com/open-rmf/rmf_traffic_editor/pull/491>`_)
* bugfix: specify coordiate_system when generating yaml for lift. (`#488 <https://github.com/open-rmf/rmf_traffic_editor/pull/488>`_)
* Handle geometry collections (`#476 <https://github.com/open-rmf/rmf_traffic_editor/pull/476>`_)
* Contributors: Arjo Chakravarty, Grey, Luca Della Vedova, Teo Koon Peng, Xiyu, cwrx777, methylDragon, Yadunund

1.8.2 (2023-12-15)
------------------
* Export door information to nav graphs (`#479 <https://github.com/open-rmf/rmf_traffic_editor/pull/479>`_)
Expand Down
17 changes: 9 additions & 8 deletions rmf_building_map_tools/building_map/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -433,18 +433,18 @@ def generate_sdf_world(self):
lift.generate_cabin(world)

charger_waypoints_ele = SubElement(
world,
'rmf_charger_waypoints',
{'name': 'charger_waypoints'})
world,
'rmf_charger_waypoints',
{'name': 'charger_waypoints'})

for level_name, level in self.levels.items():
for vertex in level.transformed_vertices:
if 'is_charger' in vertex.params:
SubElement(
charger_waypoints_ele,
'rmf_vertex',
{'name': vertex.name, 'x': str(vertex.x),
'y': str(vertex.y), 'level': level_name})
charger_waypoints_ele,
'rmf_vertex',
{'name': vertex.name, 'x': str(vertex.x),
'y': str(vertex.y), 'level': level_name})

if self.coordinate_system == CoordinateSystem.web_mercator:
(tx, ty) = self.global_transform.x, self.global_transform.y
Expand Down Expand Up @@ -704,7 +704,8 @@ def write_yaml_file(self, filename):

d['lifts'] = {}
for lift_name, lift in self.lifts.items():
d['lifts'][lift_name] = lift.to_yaml()
d['lifts'][lift_name] = lift.to_yaml(
self.coordinate_system)

yaml.dump(d, f)

Expand Down
4 changes: 2 additions & 2 deletions rmf_building_map_tools/building_map/floor.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ def triangulate_polygon(self, polygon, triangles):
plt.plot(poly_x, poly_y, 'b', linewidth=4)

elif geom.geom_type == 'MultiPolygon':
for poly in list(geom):
for poly in list(geom.geoms):
self.triangulate_polygon(poly, triangles)

elif geom.geom_type == 'GeometryCollection':
# this can happen if the original triangulation needed
# to be clipped to lie within the original floor polygon
# for example, if a long triangle crossed a concave region
# and you end up with >=1 polygons and >=1 points or edges.
for item in geom:
for item in geom.geoms:
if item.geom_type == 'Polygon':
self.triangulate_polygon(item, triangles)

Expand Down
4 changes: 2 additions & 2 deletions rmf_building_map_tools/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rmf_building_map_tools</name>
<version>1.8.2</version>
<version>1.9.0</version>
<description>RMF Building map tools</description>
<maintainer email="mquigley@openrobotics.org">Morgan Quigley</maintainer>
<maintainer email="marco@openrobotics.org">Marco A. Gutiérrez</maintainer>
Expand All @@ -11,7 +11,7 @@
<build_depend>rmf_building_map_msgs</build_depend>

<exec_depend>ament_index_python</exec_depend>
<exec_depend>gz-fuel-tools9</exec_depend>
<exec_depend>gz_fuel_tools_vendor</exec_depend>
<exec_depend>python3-fiona</exec_depend>
<exec_depend>python3-pyproj</exec_depend>
<exec_depend>python3-requests</exec_depend>
Expand Down
9 changes: 7 additions & 2 deletions rmf_building_map_tools/pit_crew/pit_crew.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
while status == 200 and not break_flag:
logger.info("Fetching page: %d" % page)

resp = requests.get("%s?page=%d" % (url_base, page))
resp = requests.get("%s?page=%d&per_page=100" % (url_base, page))
status = resp.status_code
page += 1

Expand All @@ -854,7 +854,12 @@ def build_and_update_cache(cache_file_path=None, write_to_cache=True,
author_name = model.get("owner", "")

# If a cached model was found, halt
if (model_name, author_name) in old_cache['model_cache']:
if (
(model_name, author_name) in old_cache['model_cache']
# this particular model is duplicated in fuel,
# causing the cache to break early
and model_name != "ur5_rg2" and author_name != "anni"
):
logger.info("Cached model found! "
"Halting Fuel traversal...")
break_flag = True
Expand Down
2 changes: 1 addition & 1 deletion rmf_building_map_tools/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name=package_name,
version='1.8.1',
version='1.9.0',
packages=[
'building_crowdsim',
'building_crowdsim.navmesh',
Expand Down
7 changes: 7 additions & 0 deletions rmf_traffic_editor/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@
Changelog for package rmf\_traffic\_editor
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

1.9.0 (2024-06-01)
------------------
* Fix buildfarm build of rmf_traffic_editor packages (`#495 <https://github.com/open-rmf/rmf_traffic_editor/pull/495>`_)
* Harmonic release and ECS refactor (`#483 <https://github.com/open-rmf/rmf_traffic_editor/pull/483>`_)
* Fix empty generate_crs in building yaml. (`#482 <https://github.com/open-rmf/rmf_traffic_editor/pull/482>`_)
* Contributors: Luca Della Vedova, Grey, cwrx777

1.8.2 (2023-12-15)
------------------
* Merge radius property (`#480 <https://github.com/open-rmf/rmf_traffic_editor/pull/480>`_)
Expand Down
4 changes: 1 addition & 3 deletions rmf_traffic_editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,7 @@ if (BUILD_TESTING)

find_file(uncrustify_config_file
NAMES "rmf_code_style.cfg"
PATHS
"${rmf_utils_DIR}/../../../share/rmf_utils/"
"/opt/ros/galactic/share/rmf_utils")
PATHS "${rmf_utils_DIR}/../../../share/rmf_utils/")

ament_uncrustify(
ARGN include gui
Expand Down
12 changes: 10 additions & 2 deletions rmf_traffic_editor/gui/building_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,16 @@ void BuildingDialog::ok_button_clicked()
_building.reference_level_name =
_reference_floor_combo_box->currentText().toStdString();

_building.params["generate_crs"] =
Param(generate_crs_line_edit->text().toStdString());
if (!generate_crs_line_edit->text().isEmpty())
{
_building.params["generate_crs"] = Param(
generate_crs_line_edit->text().toStdString());
}
else
{
if (_building.params.find("generate_crs") != _building.params.end())
_building.params.erase("generate_crs");
}

accept();
}
3 changes: 2 additions & 1 deletion rmf_traffic_editor/gui/crowd_sim/agent_profile_table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ void AgentProfileTab::list_item_in_cache()
{
auto current_profile = _cache[i];
setItem(i, 0,
new QTableWidgetItem(QString::fromStdString(current_profile.profile_name)));
new QTableWidgetItem(QString::fromStdString(
current_profile.profile_name)));
setItem(i, 1,
new QTableWidgetItem(QString::number(
static_cast<uint>(current_profile.profile_class))));
Expand Down
11 changes: 6 additions & 5 deletions rmf_traffic_editor/gui/crowd_sim/condition_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ ConditionDialog::ConditionDialog(
auto root_condition = _current_transition.get_condition();
if (crowd_sim::Condition::GOAL == root_condition->get_type())
{
auto goal_condition = std::dynamic_pointer_cast<crowd_sim::ConditionGOAL>(
root_condition);
auto goal_condition =
std::dynamic_pointer_cast<crowd_sim::ConditionGOAL>(root_condition);
goal_condition->set_value(temp);
}
if (crowd_sim::Condition::TIMER == root_condition->get_type())
{
auto timer_condition = std::dynamic_pointer_cast<crowd_sim::ConditionTIMER>(
root_condition);
auto timer_condition =
std::dynamic_pointer_cast<crowd_sim::ConditionTIMER>(root_condition);
timer_condition->set_value(temp);
}
}
Expand Down Expand Up @@ -268,7 +268,8 @@ void ConditionDialog::_construct_leaf_condition_widget(
condition_value->setText(QString::number(_condition2ValueD));
std::string condition_label = "condition" + std::to_string(condition_index) +
":";
condition_hbox->addWidget(new QLabel(QString::fromStdString(condition_label) ));
condition_hbox->addWidget(new QLabel(QString::fromStdString(
condition_label) ));
condition_hbox->addWidget(condition_type);
condition_hbox->addWidget(condition_value);
connect(
Expand Down
3 changes: 2 additions & 1 deletion rmf_traffic_editor/gui/crowd_sim/to_state_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ ToStateDialog::ToStateDialog(
_to_state_tab = ToStateTab::init_and_make(crowd_sim_impl, transition);
if (!_to_state_tab)
{
throw std::runtime_error("Failed to initialize ToStateTab in ToStateDialog");
throw std::runtime_error(
"Failed to initialize ToStateTab in ToStateDialog");
}
_to_state_tab->update();
std::string title = "from_state: " + transition.get_from_state();
Expand Down
3 changes: 2 additions & 1 deletion rmf_traffic_editor/gui/editor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,8 @@ void Editor::load_model_names()
try
{
share_dir =
ament_index_cpp::get_package_share_directory("rmf_traffic_editor_assets");
ament_index_cpp::get_package_share_directory(
"rmf_traffic_editor_assets");

ament_index_cpp::get_resource("rmf_traffic_editor_assets",
"assets",
Expand Down
Loading

0 comments on commit 64d2945

Please sign in to comment.