Comments (12)
Unfortunately, I have no idea on how to fix this. I would recommend the following to investigate:
- Check if the problem is the same with a Javascript proto (instead of Lua).
- Check the change log of R2023b to identify which PR may have caused this bug.
from webots.
Candidates: #5978, #5676, #5774.
from webots.
A PROTO with Javascript rather than Lua suffers from the same symptoms.
from webots.
Can I debug the generated PROTO files (after going through the engine)?
from webots.
Yes, there is a menu in the scene tree allowing to see the generated proto file.
from webots.
When trying to write a small example to reproduce the issue, I wrote this PROTO:
#VRML_SIM R2023b utf8
# Robot {
# children [
# DEF led LED {
# }
# ]
# controller "my_supervisor"
# supervisor TRUE
# }
#
PROTO MyRobot [
field SFVec3f translation 0 0 0
field SFRotation rotation 0 0 1 0
field SFString name "robot"
]
{
Robot {
translation IS translation
rotation IS rotation
name IS name
controller "my_supervisor"
supervisor TRUE
children [
DEF %{= "led" }% LED {
}
]
}
}
with this supervisor:
"""my_supervisor controller."""
# You may need to import some classes of the controller module. Ex:
# from controller import Robot, Motor, DistanceSensor
from controller import Supervisor
class Test(Supervisor):
def __init__(self):
super().__init__()
def run(self):
my_led = self.getFromDef('my_led')
led = my_led.getFromProtoDef('led')
print(f'{led=}')
print(f'{led.getPosition()=}')
controller = Test()
controller.run()
and this world
#VRML_SIM R2023b utf8
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/26e08bbf6049f8d3ec3af3dd874e5f5d4062ab96/projects/objects/backgrounds/protos/TexturedBackground.proto"
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/26e08bbf6049f8d3ec3af3dd874e5f5d4062ab96/projects/objects/backgrounds/protos/TexturedBackgroundLight.proto"
EXTERNPROTO "../protos/MyRobot.proto"
WorldInfo {
}
Viewpoint {
orientation -0.5773502691896257 0.5773502691896257 0.5773502691896257 2.0944
position 0 0 10
}
TexturedBackground {
}
TexturedBackgroundLight {
}
DEF transform Pose {
children [
DEF my_led MyRobot {
}
]
}
but this combination does NOT trigger the issue. I'll have to dig farther.
from webots.
I'm trying to understand the code. What is a PROTO parameter node? In our case, when the issue appears, protoParameterNodeInstances()
returns an empty list.
from webots.
I am not sure, but it could be the nodes that are passed as PROTO parameters.
from webots.
Do you mean a parameter whose type is a node?
from webots.
Yes.
from webots.
git bisect
allowed to determine that the bug was introduced in b95a736 "Refactor node and PROTO creation (#5779)"
from webots.
Nice catch! I would suggest you to investigate commit-per-commit on #5779 to understand which commit did introduce the bug. Unfortunately @stefaniapedrazzi is not working any more with us and won't be able to help you on this.
from webots.
Related Issues (20)
- Difficulty in calculating the correct position in the webots environment
- stdout failed to redirect to the console HOT 1
- TouchSensor return zero force when used in a Joint
- Can't reference fields from PROTO javascript functions if not referenced directly
- ROS2 Support HOT 1
- Fail to install webots on WSL2 Ubuntu-22.04 HOT 3
- Importing PROTOs from non-official web sources HOT 4
- Node Ancestry Should be Considered for Node Type Restrictions in PROTOs HOT 1
- `Device`s with duplicate names cause unexpected behavior
- Webots Simulink Error: Unable to Access lib.pointer in wb_lidar_get_point_cloud API Call
- Speaker relative path not working with external controller HOT 7
- Invalid sound path results in crash
- There is an error between the actual value and the set value when setting the position of the robot with the supervisor in webots 2023b. HOT 1
- Release 2024a HOT 11
- A4/Portal fail test HOT 2
- Radar sensor, using Python API to read target data does not meet expectations HOT 1
- Nodes Cannot Be Inserted into an Unconnected Field of a PROTO
- issue with inverted pendulum benchmark
- Omni wheels rollers rotating direction
- Viewpoint tracking not working HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from webots.