Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Node Field Query API #6613

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
148 commits
Select commit Hold shift + click to select a range
41f86c6
fix typo
CoolSpy3 Jul 23, 2024
30953fc
send proto ancestry to controllers
CoolSpy3 Jul 23, 2024
80dd4c9
expose proto ancestry in controller api
CoolSpy3 Jul 23, 2024
01e067d
send proto ancestry in all relevant messages
CoolSpy3 Jul 23, 2024
63ead0e
relocate proto data to WbProto
CoolSpy3 Aug 1, 2024
1cac9e7
rename WbProto to WbNodeProtoInfo
CoolSpy3 Aug 1, 2024
905d20d
revert last two commits
CoolSpy3 Aug 1, 2024
df6bff9
keep track of internal proto fields
CoolSpy3 Aug 1, 2024
389b9f9
basic supervisor proto implementation
CoolSpy3 Aug 2, 2024
3c5327e
swap meanings of wb_supervisor_node_get_field and wb_supervisor_node_…
CoolSpy3 Aug 2, 2024
80807b3
use an array list rather than a linked list for keeping track of node…
CoolSpy3 Aug 2, 2024
6a829dd
allow supervisor to query protos from Webots
CoolSpy3 Aug 2, 2024
f5dc585
use correct read_only behavior
CoolSpy3 Aug 2, 2024
87abe0d
fix get_proto api
CoolSpy3 Aug 2, 2024
0078982
update supervisor/Webots field query api
CoolSpy3 Aug 3, 2024
381c8c7
fix Makefile
CoolSpy3 Aug 3, 2024
000ae8d
fix return reference to temporary
CoolSpy3 Aug 3, 2024
2bad19f
supervisor fixes
CoolSpy3 Aug 3, 2024
8e1ce66
more supervisor fixes
CoolSpy3 Aug 3, 2024
9e917b9
fix variable name
CoolSpy3 Aug 3, 2024
62eb1bf
fix field get value impl
CoolSpy3 Aug 3, 2024
4c7886d
fix controller field lookup
CoolSpy3 Aug 3, 2024
5920637
fix get number of fields/parameters
CoolSpy3 Aug 3, 2024
74d4cf4
Merge branch 'develop' of https://github.com/cyberbotics/webots into …
CoolSpy3 Aug 3, 2024
a246f3e
fix function name
CoolSpy3 Aug 3, 2024
77fb10d
fix wb_supervisor_proto_get_parent
CoolSpy3 Aug 3, 2024
160d425
better handling of hidden parameters
CoolSpy3 Aug 3, 2024
64f3fce
remove wb_supervisor_node_get_proto_ancestor
CoolSpy3 Aug 3, 2024
af1062e
revert 30953fc33133dcfa74dee7b7eb977585c0ab7054...01e067dccae2a794954…
CoolSpy3 Aug 3, 2024
f32692e
remove accidental deletion
CoolSpy3 Aug 3, 2024
c3daa87
fix indentation
CoolSpy3 Aug 12, 2024
a4a6485
forward proto field lookups to the actual parameters
CoolSpy3 Aug 15, 2024
c4bd83d
fix typo
CoolSpy3 Aug 15, 2024
9c318ac
update supervisor_notify_import_remove test
CoolSpy3 Aug 16, 2024
95683f8
null safety
CoolSpy3 Aug 17, 2024
cac9d62
add proto tests
CoolSpy3 Aug 17, 2024
ddd84b9
fix C_SUPERVISOR_FIELD_GET_FROM_NAME implementation
CoolSpy3 Aug 17, 2024
d0631a9
test fixes
CoolSpy3 Aug 17, 2024
12e0d75
update supervisor_proto test
CoolSpy3 Aug 17, 2024
1d3a1a8
fix supervisor_proto_fields compilation errors
CoolSpy3 Aug 17, 2024
c017293
fix proto import paths
CoolSpy3 Aug 17, 2024
12f57d5
fix bracket type
CoolSpy3 Aug 17, 2024
6f8e71e
fix memory leak
CoolSpy3 Aug 17, 2024
0024bd6
Merge remote-tracking branch 'upstream/develop' into feature-improve-…
CoolSpy3 Aug 17, 2024
a4a2f94
remove unused SolidProtoHierarchy.children field (#6630)
CoolSpy3 Aug 17, 2024
4fcd3fc
add additional log info
CoolSpy3 Aug 17, 2024
ba7f719
bugfix to previous commit
CoolSpy3 Aug 17, 2024
afe639a
step the simulation after setting field values
CoolSpy3 Aug 17, 2024
ab77b4d
fix null return value in wb_supervisor_proto_get_number_of_parameters
CoolSpy3 Aug 17, 2024
0c94bb6
fix actual parameter lookup in proto parameter lookup functions
CoolSpy3 Aug 17, 2024
7c19989
use wb_supervisor_node_get_from_proto_def to retrieve the internal node
CoolSpy3 Aug 17, 2024
4be1f89
fix def name
CoolSpy3 Aug 17, 2024
cc6f13a
fix proto names in test
CoolSpy3 Aug 18, 2024
cabdb0c
initialize struct members to NULL
CoolSpy3 Aug 18, 2024
f4d4a96
initialize node proto_info to NULL
CoolSpy3 Aug 18, 2024
cc6c840
update expected proto hierarchy
CoolSpy3 Aug 18, 2024
fa292f2
increment loop counter
CoolSpy3 Aug 18, 2024
47ba103
alternate method of determining the actual parameter of a field
CoolSpy3 Aug 18, 2024
90de3d2
initialize field to NULL
CoolSpy3 Aug 18, 2024
16fd025
fix SolidProtoHierarchyBase
CoolSpy3 Aug 18, 2024
46e6a5b
use correct parameter retrieval method
CoolSpy3 Aug 18, 2024
c47c8c0
use internal=true for proto parameter lookups
CoolSpy3 Aug 18, 2024
1357c97
fix bug when retrieving the first field of a proto
CoolSpy3 Aug 18, 2024
f82b62c
fix base node field query
CoolSpy3 Aug 18, 2024
9171928
refresh internal node reference after regeneration
CoolSpy3 Aug 18, 2024
3cf67ed
fix internal_proto nullity check
CoolSpy3 Aug 18, 2024
f925115
fix base node field lookup error messages
CoolSpy3 Aug 18, 2024
4f933e9
fix retrieval of internal node fields
CoolSpy3 Aug 19, 2024
1179184
don't expect changes in read-only fields
CoolSpy3 Aug 19, 2024
7ff577e
use correct check value in read-only assertion
CoolSpy3 Aug 19, 2024
16d6145
don't check non-existent parameters
CoolSpy3 Aug 19, 2024
5c57086
fix array in if condition
CoolSpy3 Aug 19, 2024
e5f4cd1
add wb_supervisor_proto_is_derived
CoolSpy3 Aug 19, 2024
1e48720
fix wb_proto_is_derived
CoolSpy3 Aug 19, 2024
db36420
update c++ api
CoolSpy3 Aug 19, 2024
ec891c2
fix variable name conflict
CoolSpy3 Aug 19, 2024
558fe4a
add Node::getProto and update style
CoolSpy3 Aug 19, 2024
c968ee0
update java api
CoolSpy3 Aug 19, 2024
9b0257d
add todo
CoolSpy3 Aug 19, 2024
5e38e66
update python api
CoolSpy3 Aug 19, 2024
31932c3
update the matlab api
CoolSpy3 Aug 19, 2024
1207c36
use camelCase in python api
CoolSpy3 Aug 19, 2024
33c699e
add wb_supervisor_proto_is_derived to python and matlab apis
CoolSpy3 Aug 19, 2024
645d4e9
update WbLanguage.cpp
CoolSpy3 Aug 19, 2024
4e49dae
rename methods for clarity
CoolSpy3 Aug 20, 2024
d3cfa07
fix circular dependency
CoolSpy3 Aug 20, 2024
aa7fe5f
fix other circular dependency
CoolSpy3 Aug 20, 2024
c498022
unset allow_search_in_proto
CoolSpy3 Aug 20, 2024
edad272
swap field read only logic
CoolSpy3 Aug 20, 2024
cf50f35
update proto_get_parent method name
CoolSpy3 Aug 20, 2024
a1421a2
update references to renamed supervisor methods
CoolSpy3 Aug 20, 2024
0068bb4
update ros api
CoolSpy3 Aug 20, 2024
98cbab2
run clang-format
CoolSpy3 Aug 20, 2024
415a968
fix cppcheck warnings
CoolSpy3 Aug 20, 2024
e98b59a
fix Controller.def method names
CoolSpy3 Aug 20, 2024
401d525
fix function name
CoolSpy3 Aug 20, 2024
7e1da06
python formatting
CoolSpy3 Aug 20, 2024
9fb613b
ros fixes
CoolSpy3 Aug 20, 2024
94448f6
run clang-format
CoolSpy3 Aug 20, 2024
3177b10
more ros fixes
CoolSpy3 Aug 20, 2024
f66a0b3
pin empy version
CoolSpy3 Aug 20, 2024
acf15aa
bump webots_ros
CoolSpy3 Aug 20, 2024
f23c96b
bump webots_ros
CoolSpy3 Aug 20, 2024
6357b5e
bump webots_ros
CoolSpy3 Aug 21, 2024
37ffc0e
bump webots_ros
CoolSpy3 Aug 21, 2024
1f58041
fix lua syntax
CoolSpy3 Aug 21, 2024
3486619
account for proto regeneration in test suite
CoolSpy3 Aug 21, 2024
8bba787
verify field integrity before checking lookup_field
CoolSpy3 Aug 21, 2024
cb95f61
run clang-format
CoolSpy3 Aug 21, 2024
98e1d41
don't return invalid proto references
CoolSpy3 Aug 22, 2024
4706ea2
fix FieldImportBase proto definition
CoolSpy3 Aug 22, 2024
180eb84
fix race condition (see long commit message)
CoolSpy3 Aug 25, 2024
594f29b
use snake_case in supervisor_notify_import_remove_mf
CoolSpy3 Aug 25, 2024
a526dde
get rid of FieldImportBase
CoolSpy3 Aug 25, 2024
1b0ecee
use spaces instead of tabs
CoolSpy3 Aug 25, 2024
9ef22da
cleanup proto map
CoolSpy3 Aug 25, 2024
adfddd2
run clang-format
CoolSpy3 Aug 25, 2024
06c2ffd
remove const for consistency
CoolSpy3 Aug 25, 2024
69b5276
make wb_supervisor_proto_get_type_name(NULL) return "" for consistency
CoolSpy3 Aug 25, 2024
7efe89b
update documentation
CoolSpy3 Aug 25, 2024
a5f6dcc
fix references to old proto field access methods
CoolSpy3 Aug 25, 2024
a7cae9c
run clang-format
CoolSpy3 Aug 25, 2024
e6fc1db
fix proto regeneration check
CoolSpy3 Aug 25, 2024
4cd80a6
update the changelog
CoolSpy3 Aug 28, 2024
4943162
Merge branch 'develop' of https://github.com/cyberbotics/webots into …
CoolSpy3 Aug 28, 2024
bead0c9
bug fixes
CoolSpy3 Aug 28, 2024
d4d3120
always get fields by name
CoolSpy3 Aug 28, 2024
d02c751
run clang-format
CoolSpy3 Aug 28, 2024
39942df
remove explicit field name array size
CoolSpy3 Aug 28, 2024
3ca097e
Merge branch 'develop' into feature-improve-node-field-query-api
CoolSpy3 Sep 1, 2024
fae3926
Merge branch 'develop' into feature-improve-node-field-query-api
CoolSpy3 Sep 3, 2024
4501943
Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows …
dependabot[bot] Sep 4, 2024
fe3900b
Merge branch 'develop' into feature-improve-node-field-query-api
CoolSpy3 Sep 5, 2024
bf1e027
add comment
CoolSpy3 Sep 5, 2024
ebf8625
Bump actions/upload-artifact to v4 (#6654)
CoolSpy3 Sep 6, 2024
56a6fcf
Merge branch 'develop' into feature-improve-node-field-query-api
CoolSpy3 Sep 6, 2024
d7e3064
include proto id in field query when processing value get requests
CoolSpy3 Sep 6, 2024
404b36d
check for proto parent validity instead of just NULL
CoolSpy3 Sep 6, 2024
9778de3
Merge branch 'master' of https://github.com/cyberbotics/webots into f…
CoolSpy3 Sep 6, 2024
a4ed860
fix variable name
CoolSpy3 Sep 6, 2024
94d5774
add changelog entry for matlab method signature change
CoolSpy3 Sep 7, 2024
ad8af77
fix test assert message
CoolSpy3 Sep 7, 2024
a88d833
formatting
CoolSpy3 Sep 7, 2024
f2b6175
Merge branch 'develop' into feature-improve-node-field-query-api
brettle Sep 7, 2024
392c787
fix types in supervisor documentation
CoolSpy3 Sep 7, 2024
f39e951
add missing references to wb_supervisor_node_get_proto
CoolSpy3 Sep 7, 2024
be83b10
fix ros service ids in documentation
CoolSpy3 Sep 7, 2024
cf26cb1
add wb_supervisor_node_get_proto to Controller.def
CoolSpy3 Sep 7, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test_suite_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ jobs:
run: |
export WEBOTS_HOME=$PWD/artifact/webots
export ROS_DISTRO=${{ matrix.ROS_DISTRO }}
python -m pip install rospkg catkin_pkg empy defusedxml netifaces
python -m pip install rospkg catkin_pkg empy==3.3.4 defusedxml netifaces
Xvfb :99 &
export DISPLAY=:99
./tests/ros.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_suite_linux_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ jobs:
run: |
export WEBOTS_HOME=$PWD/artifact/webots
export ROS_DISTRO=${{ matrix.ROS_DISTRO }}
python -m pip install rospkg catkin_pkg empy defusedxml netifaces
python -m pip install rospkg catkin_pkg empy==3.3.4 defusedxml netifaces
Xvfb :99 &
export DISPLAY=:99
./tests/ros.sh
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/changelog-r2020.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@ Released on September 1st, 2020.
- Remove scaling factor in matrix returned by [`wb_supervisor_node_get_orientation`](supervisor.md#wb_supervisor_node_get_orientation) ([#2112](https://github.com/cyberbotics/webots/pull/2112)).
- Fixed conversion of identity matrix to quaternion in ROS API ([#2112](https://github.com/cyberbotics/webots/pull/2112)).
- Fixed header stamps of the topics published by the ROS controller ([#2127](https://github.com/cyberbotics/webots/pull/2127)).
- Fixed the [`camera/recognition_objects`](camera.md#wb_camera_recognition_get_objects) ROS topic not published when the [`camera/image`](camera.md#wb_camera_recognition_get_objects) topic has no subscriber ([#2115](https://github.com/cyberbotics/webots/pull/2115)).
- **macOS: Removed the `ros` controller**, the [custom Python ROS controller](https://www.cyberbotics.com/doc/guide/using-ros#custom-ros-controller) should be used instead ([#2053](https://github.com/cyberbotics/webots/pull/2053)).
- Fixed the [`camera/recognition_objects`](camera.md#wb_camera_recognition_get_objects) ROS topic not published when the [`camera/image`](camera.md#wb_camera_recognition_get_objects) topic has no subscriber ([#2115](https://github.com/cyberbotics/webots/pull/2115)).
- **macOS: Removed the `ros` controller**, the [custom Python ROS controller](https://www.cyberbotics.com/doc/guide/using-ros#custom-ros-controller) should be used instead ([#2053](https://github.com/cyberbotics/webots/pull/2053)).
- Fixed DEF node not found if defined in PROTO default parameter value ([#2107](https://github.com/cyberbotics/webots/pull/2107)).
- Fixed crash occurring with some PROTO nodes when modifying fields from the scene tree that trigger the PROTO model regeneration ([#2100](https://github.com/cyberbotics/webots/pull/2100)).
- Fixed field changes not applied in case of nested [PROTO](proto.md) nodes ([#2063](https://github.com/cyberbotics/webots/pull/2063)).
- Windows: Fixed generation of procedural PROTO nodes using the `gd` module ([#2070](https://github.com/cyberbotics/webots/pull/2070)).
- Fixed the [vision](../guide/samples-howto.md#vision-wbt) sample simulation ([#2143](https://github.com/cyberbotics/webots/pull/2143)).
- Fixed bugs in streaming server protocol and added support for X3D/MJPEG mode selection in simulation server ([#2077](https://github.com/cyberbotics/webots/pull/2077)).
- Linux: Fixed the execution of robot controllers with firejail ([#2071](https://github.com/cyberbotics/webots/pull/2071)).
- Linux: Fixed the execution of robot controllers with firejail ([#2071](https://github.com/cyberbotics/webots/pull/2071)).
- Fixed the `roadBorderWidth` field of the `HelicoidalRoadSegment` PROTO node ([#2099](https://github.com/cyberbotics/webots/pull/2099)).
- Fixed the `near` field of the `Robotino3Webcam` [Camera](camera.md) ([#2051](https://github.com/cyberbotics/webots/pull/2051)).
- Fixed orientation of the [Lights](light.md) in the `robotino3` world ([#2051](https://github.com/cyberbotics/webots/pull/2051)).
Expand All @@ -51,7 +51,7 @@ Released on July 29th, 2020.
- New Features
- Added a [Mesh](mesh.md) node allowing to use external 3D file in Webots ([#1419](https://github.com/cyberbotics/webots/pull/1419)).
- Added the possibility to import [3D Studio mesh](https://wiki.fileformat.com/3d/3ds), [Blender](https://www.blender.org/), [Biovision Hierarchy](https://en.wikipedia.org/wiki/Biovision_Hierarchy), [Collada](https://en.wikipedia.org/wiki/COLLADA), [Filmbox](https://wiki.fileformat.com/3d/fbx/), [STL](https://en.wikipedia.org/wiki/STL_(file_format)), [Wavefront](https://wiki.fileformat.com/3d/obj), [X3D](https://www.web3d.org/getting-started-x3d) files in Webots ([#1463](https://github.com/cyberbotics/webots/pull/1463)).
- Added two new functions to get internal PROTO node fields: [`wb_supervisor_node_get_from_proto_def`](supervisor.md#wb_supervisor_node_get_from_proto_def) and [`wb_supervisor_node_get_proto_field`](supervisor.md#wb_supervisor_node_get_proto_field) ([#1331](https://github.com/cyberbotics/webots/pull/1331)).
- Added two new functions to get internal PROTO node fields: [`wb_supervisor_node_get_from_proto_def`](supervisor.md#wb_supervisor_node_get_from_proto_def) and [`wb_supervisor_node_get_proto_field`](supervisor.md#wb_supervisor_node_get_base_node_field) ([#1331](https://github.com/cyberbotics/webots/pull/1331)).
- Added the `mjpeg` web streaming mode ([#1352](https://github.com/cyberbotics/webots/pull/1352)).
- Exposed global texture maximum filtering as a parameter in the Webots preferences ([#1851](https://github.com/cyberbotics/webots/pull/1851)).
- Added a [`wb_robot_get_urdf`](robot.md#wb_robot_get_urdf) function to the [Robot](robot.md) node which allows URDF export ([#1706](https://github.com/cyberbotics/webots/pull/1706)).
Expand Down Expand Up @@ -105,7 +105,7 @@ Released on July 29th, 2020.
- Fixed crash when setting an invalid value to a field that triggers the parent PROTO regeneration ([#1868](https://github.com/cyberbotics/webots/pull/1868)).
- Fixed crash when converting a PROTO node to Base node(s) if contained in a field that triggers the parent PROTO regeneration ([#1868](https://github.com/cyberbotics/webots/pull/1868)).
- Fixed crash when deleting a node contained in a field that triggers the parent PROTO regeneration ([#1868](https://github.com/cyberbotics/webots/pull/1868)).
- Fixed crash occurring when reloading or resetting a simulation containing a [Display](display.md) device ([#1865](https://github.com/cyberbotics/webots/pull/1865)).
- Fixed crash occurring when reloading or resetting a simulation containing a [Display](display.md) device ([#1865](https://github.com/cyberbotics/webots/pull/1865)).
- Fixed crash with Python [`RangeFinder.rangeImageGetDepth`](rangefinder.md#wb_range_finder_image_get_depth) function ([#1858](https://github.com/cyberbotics/webots/pull/1858)).
- Fixed mismatch between the bounding object and visual shape of the [UnevenTerrain](https://www.cyberbotics.com/doc/guide/object-floors#uneventerrain), **and removed the `textureScale` field** ([#1792](https://github.com/cyberbotics/webots/pull/1792)).
- Fixed crash when using a [Normal](normal.md) node in a PROTO node ([#1813](https://github.com/cyberbotics/webots/pull/1813)).
Expand Down
7 changes: 7 additions & 0 deletions docs/reference/changelog-r2024.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ Released on December **th, 2023.
- Removed support for macOS 11 "Big Sur" and added support for macOS 14 "Sonoma" ([#6580](https://github.com/cyberbotics/webots/pull/6580)).
- Added the `indirectFieldAccess` tag to allow the `fields` variable to be used in proto templates without referencing a specific field ([#6614](https://github.com/cyberbotics/webots/pull/6614)).
- Added a method to include all subtypes of a node type in a PROTO field restriction ([#6574](https://github.com/cyberbotics/webots/pull/6574)).
- Improved the node field query api ([#6613](https://github.com/cyberbotics/webots/issues/6613)).
- **Renamed the `wb_supervisor_node_get_proto_*` methods to `wb_supervisor_node_get_base_node_*`**
- **Renamed the `proto` field in the `supervisor_node_get_field_*` ROS services to `queryBaseNode`**
- Added the `WbProtoRef` type to the supervisor API.
- Added the ability to query the internal structure and fields of a proto node.
- Added the ability to query the field in the scene tree that corresponds to a proto internal field.
- Fixed the method signature of `wb_supervisor_node_get_number_of_fields` in MATLAB.
- Removed support for Lua as a PROTO scripting language ([#6642](https://github.com/cyberbotics/webots/pull/6642)).
- Enhancements
- Improved the image range of the rotating [Lidar](lidar.md) ([#6324](https://github.com/cyberbotics/webots/pull/6324)).
Expand Down
Loading
Loading