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 #151

Open
wants to merge 15 commits into
base: develop
Choose a base branch
from
Open
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs sensor_msgs messag
display_set_font.srv
field_disable_sf_tracking.srv
field_enable_sf_tracking.srv
field_get_actual_field.srv
field_get_bool.srv
field_get_color.srv
field_get_count.srv
Expand Down Expand Up @@ -109,6 +110,7 @@ find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs sensor_msgs messag
node_get_pose.srv
node_get_parent_node.srv
node_get_position.srv
node_get_proto.srv
node_get_static_balance.srv
node_get_status.srv
node_get_string.srv
Expand All @@ -122,6 +124,12 @@ find_package(catkin REQUIRED COMPONENTS roscpp rospy std_msgs sensor_msgs messag
node_set_visibility.srv
node_set_velocity.srv
pen_set_ink_color.srv
proto_get_field.srv
proto_get_field_by_index.srv
proto_get_number_of_fields.srv
proto_get_parent.srv
proto_get_type_name.srv
proto_is_derived.srv
range_finder_get_info.srv
receiver_get_emitter_direction.srv
robot_get_device_list.srv
Expand Down
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<name>webots_ros</name>
<!-- Before 2022.1.0: Version matches Webots version this way: (major - 2018).minor.maintenance -->
<!-- From 2022.1.0: Version matches Webots version this way: year.minor.maintenance -->
<version>2023.0.0</version>
<version>2023.1.0</version>
<description>The ROS package containing examples for interfacing ROS with the standard ROS controller of Webots</description>

<url>http://wiki.ros.org/webots_ros</url>
Expand Down
2 changes: 1 addition & 1 deletion plugins/robot_windows/info/info.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import RobotWindow from 'https://cyberbotics.com/wwi/R2023a/RobotWindow.js';
import RobotWindow from 'https://cyberbotics.com/wwi/R2023b/RobotWindow.js';
window.robotWindow = new RobotWindow();
window.onload = () => {
window.robotWindow.receive = function (message, robot) {
Expand Down
238 changes: 235 additions & 3 deletions src/complete_test.cpp

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions srv/field_get_actual_field.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint64 field
---
uint64 field
1 change: 0 additions & 1 deletion srv/node_disable_contact_points_tracking.srv
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
uint64 node
bool include_descendants
---
int8 success
2 changes: 1 addition & 1 deletion srv/node_get_field.srv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
uint64 node
string fieldName
bool proto
bool queryBaseNode
---
uint64 field
2 changes: 1 addition & 1 deletion srv/node_get_field_by_index.srv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
uint64 node
uint32 index
bool proto
bool queryBaseNode
---
uint64 field
2 changes: 1 addition & 1 deletion srv/node_get_number_of_fields.srv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
uint64 node
bool proto
bool queryBaseNode
---
int32 value
3 changes: 3 additions & 0 deletions srv/node_get_proto.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint64 node
---
uint64 proto
4 changes: 4 additions & 0 deletions srv/proto_get_field.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
uint64 proto
string fieldName
---
uint64 field
4 changes: 4 additions & 0 deletions srv/proto_get_field_by_index.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
uint64 proto
uint32 index
---
uint64 field
3 changes: 3 additions & 0 deletions srv/proto_get_number_of_fields.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint64 proto
---
int32 value
3 changes: 3 additions & 0 deletions srv/proto_get_parent.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint64 proto
---
uint64 proto
3 changes: 3 additions & 0 deletions srv/proto_get_type_name.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint64 proto
---
string value
3 changes: 3 additions & 0 deletions srv/proto_is_derived.srv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
uint64 proto
---
bool value
6 changes: 3 additions & 3 deletions worlds/.catch_the_bird.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000002fc00000000ffffffff0000000000fffffffc0200000001fb00000012005300630065006e0065005400720065006501000000190000033d0000000000000000fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000006900ffffff00000001000002ec0000025efc0200000001fb0000001400540065007800740045006400690074006f007200000000190000025e0000003f00ffffff00000003000004e20000005afc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073f0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c0100000000000004e20000006900ffffff000004e20000015700000001000000020000000100000008fc00000000
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000002fc00000000ffffffff0000000000fffffffc0200000001fb00000012005300630065006e0065005400720065006501000000190000033d0000000000000000fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff000000000000000000000001000002ec0000025efc0200000001fb0000001400540065007800740045006400690074006f007200000000190000025e0000003f00ffffff0000000300000a000000005afc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073f0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a00000004f300000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000016c000002060100000002010000000101
sceneTreePerspectives: 000000ff0000000100000002000000c0000000fc0100000002010000000201
sceneTreePerspectives: 000000ff00000001000000030000001c000000c0000000000100000002010000000201
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
Expand Down
8 changes: 4 additions & 4 deletions worlds/.complete_test.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000018f00000482fc0100000004fc00000000ffffffff0000000000fffffffc0200000001fb00000012005300630065006e0065005400720065006501000000190000033d0000000000000000fb0000002c0052006f0062006f0074003a002000660075006c006c005f00730075007000650072007600690073006f007201000000000000018f0000000000000000fb0000001e00480074006d006c0052006f0062006f007400570069006e0064006f007701000000000000018f0000005400fffffffb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000005400ffffff00000001000001ed000003a2fc0200000001fb0000001400540065007800740045006400690074006f00720100000000000003a20000003c00ffffff00000003000005aa000000dafc0100000001fb0000000e0043006f006e0073006f006c00650100000195000005aa0000005400ffffff000003b7000003a200000004000000040000000100000008fc00000000
simulationViewPerspectives: 000000ff000000010000000200000170000003490100000006010000000101
sceneTreePerspectives: 000000ff0000000100000002000000c0000000fc0100000006010000000201
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000018f00000482fc0100000004fc00000000ffffffff0000000000fffffffc0200000001fb00000012005300630065006e0065005400720065006501000000190000033d0000000000000000fb0000002c0052006f0062006f0074003a002000660075006c006c005f00730075007000650072007600690073006f007201000000000000018f0000000000000000fb0000001e00480074006d006c0052006f0062006f007400570069006e0064006f007701000000000000018f0000000000000000fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff000000000000000000000001000001ed00000473fc0200000001fb0000001400540065007800740045006400690074006f00720100000016000004730000003f00ffffff0000000300000a00000000dafc0100000002fb0000000e0043006f006e0073006f006c00650100000195000005aa0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff000008110000047300000004000000040000000100000008fc00000000
simulationViewPerspectives: 000000ff000000010000000200000170000003490100000002010000000101
sceneTreePerspectives: 000000ff0000000100000003000000c0000000fc000000000100000002010000000201
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
Expand Down
8 changes: 4 additions & 4 deletions worlds/.e-puck_line.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000016c0000033dfc0200000001fb00000012005300630065006e0065005400720065006500000000190000033d0000000000000000000000010000016200000309fc0200000001fb0000001400540065007800740045006400690074006f00720100000019000003090000003e00ffffff000000030000073f000000e2fc0100000001fb0000000e0043006f006e0073006f006c006501000000000000073f0000005a00ffffff000005d70000030900000004000000040000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000016c000002850100000006010000000101
sceneTreePerspectives: 000000ff0000000100000002000000c0000000a80100000006010000000201
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000016c0000033dfc0200000001fb00000012005300630065006e0065005400720065006500000000190000033d000000000000000000000001000001620000046bfc0200000001fb0000001400540065007800740045006400690074006f007201000000160000046b0000003f00ffffff0000000300000a00000000e2fc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073f0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff0000089c0000046b00000004000000040000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000016c000002850100000002010000000101
sceneTreePerspectives: 000000ff0000000100000003000000c0000000a8000000000100000002010000000201
minimizedPerspectives: 000000ff00000000fd00000003000000000000016c0000033dfc0200000001fb00000012005300630065006e0065005400720065006501000000190000033d0000018500ffffff000000010000033f000001ebfc0200000001fb0000001400540065007800740045006400690074006f00720100000019000001eb000000ab00ffffff00000003000003ed0000014cfc0100000001fb0000000e0043006f006e0073006f006c00650100000172000003ed0000004e00ffffff000000a8000001eb00000004000000040000000100000008fc00000000
maximizedDockId: -1
centralWidgetVisible: 1
Expand Down
8 changes: 4 additions & 4 deletions worlds/.keyboard_teleop.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000016c0000033dfc0200000001fb00000012005300630065006e0065005400720065006501000000190000033d000000000000000000000001000001e100000258fc0200000001fb0000001400540065007800740045006400690074006f00720100000019000002580000003e00ffffff000000030000073f00000193fc0100000001fb0000000e0043006f006e0073006f006c006501000000000000073f0000005a00ffffff000005580000025800000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000016c000002060100000006010000000101
sceneTreePerspectives: 000000ff0000000100000002000000c0000000a80100000006010000000201
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000016c0000033dfc0200000001fb00000012005300630065006e0065005400720065006501000000190000033d000000000000000000000001000001e1000003bafc0200000001fb0000001400540065007800740045006400690074006f00720100000016000003ba0000003f00ffffff0000000300000a0000000193fc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073f0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff0000081d000003ba00000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000016c000002060100000002010000000101
sceneTreePerspectives: 000000ff0000000100000003000000c0000000a8000000000100000002010000000201
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
Expand Down
8 changes: 4 additions & 4 deletions worlds/.panoramic_view_recorder.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000005400ffffff000000010000012e000003a2fc0200000001fb0000001400540065007800740045006400690074006f00720100000000000003a20000003c00ffffff000000030000073f000000dafc0100000001fb0000000e0043006f006e0073006f006c006501000000000000073f0000005400ffffff0000060b000003a200000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000016c000004a00100000006010000000101
sceneTreePerspectives: 000000ff0000000100000002000000c0000001120100000006010000000201
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000000000000000000000010000012e00000473fc0200000001fb0000001400540065007800740045006400690074006f00720100000016000004730000003f00ffffff0000000300000a00000000dafc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073f0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff000008d00000047300000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000016c000004a00100000002010000000101
sceneTreePerspectives: 000000ff0000000100000003000000c000000112000000000100000002010000000201
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
Expand Down
8 changes: 4 additions & 4 deletions worlds/.pioneer3at.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000005400ffffff000000010000012e000002d9fc0200000001fb0000001400540065007800740045006400690074006f00720000000019000002d9000000a200ffffff000000030000073f000000bbfc0100000001fb0000000e0043006f006e0073006f006c006501000000000000073f0000005400ffffff0000073f000003c100000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000011e000004db0100000006010000000101
sceneTreePerspectives: 000000ff0000000100000002000000c0000001240100000006010000000201
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000000000000000000000010000012e000002d9fc0200000001fb0000001400540065007800740045006400690074006f00720000000019000002d90000003f00ffffff0000000300000a00000000bbfc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073f0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a000000049200000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff00000001000000020000011e000004db0100000002010000000101
sceneTreePerspectives: 000000ff0000000100000003000000c000000124000000000100000002010000000201
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
Expand Down
6 changes: 3 additions & 3 deletions worlds/.ros_python.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000006900ffffff00000001000001c900000375fc0200000001fb0000001400540065007800740045006400690074006f00720100000000000003750000008900ffffff000000030000073f00000093fc0100000001fb0000000e0043006f006e0073006f006c006501000000000000073f0000006900ffffff000005740000037500000001000000020000000100000008fc00000000
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff000000000000000000000001000001c9000004bafc0200000001fb0000001400540065007800740045006400690074006f00720100000016000004ba0000008900ffffff0000000300000a0000000093fc0100000002fb0000000e0043006f006e0073006f006c006501000000000000073f0000000000000000fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000835000004ba00000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff000000010000000200000100000005210100000002010000000100
sceneTreePerspectives: 000000ff0000000100000002000002aa000000fa0100000002010000000200
sceneTreePerspectives: 000000ff0000000100000003000002aa000000fa000000000100000002010000000200
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
Expand Down
6 changes: 3 additions & 3 deletions worlds/.tiago.wbproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Webots Project File version R2023a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000006900ffffff000000010000011c0000038ffc0200000001fb0000001400540065007800740045006400690074006f007200000000170000038f0000003f00ffffff000000030000078000000087fc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c0100000000000007800000006900ffffff000007800000034100000001000000020000000100000008fc00000000
Webots Project File version R2024a
perspectives: 000000ff00000000fd00000003000000000000000000000000fc0100000001fb0000001a0044006f00630075006d0065006e0074006100740069006f006e0000000000ffffffff0000000000000000000000010000011c0000038ffc0200000001fb0000001400540065007800740045006400690074006f007200000000170000038f0000003f00ffffff0000000300000a0000000087fc0100000001fb0000001a0043006f006e0073006f006c00650041006c006c0041006c006c010000000000000a000000006900ffffff00000a00000004c600000001000000020000000100000008fc00000000
simulationViewPerspectives: 000000ff000000010000000200000100000003820100000002010000000100
sceneTreePerspectives: 000000ff0000000100000002000000e0000000fa0100000002010000000200
sceneTreePerspectives: 000000ff0000000100000003000000e0000000fa000000000100000002010000000200
maximizedDockId: -1
centralWidgetVisible: 1
orthographicViewHeight: 1
Expand Down
12 changes: 6 additions & 6 deletions worlds/catch_the_bird.wbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#VRML_SIM R2023a utf8
#VRML_SIM R2024a utf8

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/floors/protos/RectangleArena.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/floors/protos/RectangleArena.proto"

WorldInfo {
}
Expand Down Expand Up @@ -233,7 +233,7 @@ Solid {
physics Physics {
}
}
Transform {
Pose {
rotation 1 0 0 1.5707996938995747
children [
Shape {
Expand All @@ -251,7 +251,7 @@ Solid {
}
]
name "body"
boundingObject Transform {
boundingObject Pose {
rotation 1 0 0 1.5708
children [
Capsule {
Expand Down
14 changes: 8 additions & 6 deletions worlds/complete_test.wbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#VRML_SIM R2023a utf8
#VRML_SIM R2024a utf8

EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/objects/floors/protos/RectangleArena.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023a/projects/humans/skin_animated_humans/protos/CharacterSkin.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/objects/floors/protos/RectangleArena.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2023b/projects/humans/skin_animated_humans/protos/CharacterSkin.proto"

WorldInfo {
}
Expand Down Expand Up @@ -55,7 +55,7 @@ DEF CONE Solid {
}
]
name "solid(1)"
boundingObject Transform {
boundingObject Pose {
translation 0 -0.04 0
children [
Box {
Expand Down Expand Up @@ -283,6 +283,8 @@ Robot {
TouchSensor {
name "touch_sensor"
}
VacuumGripper {
}
Shape {
appearance PBRAppearance {
baseColor 0.8 0 0.0117647
Expand Down
Loading