GithubHelp home page GithubHelp logo

Comments (12)

omichel avatar omichel commented on September 26, 2024

Unfortunately, I have no idea on how to fix this. I would recommend the following to investigate:

  1. Check if the problem is the same with a Javascript proto (instead of Lua).
  2. Check the change log of R2023b to identify which PR may have caused this bug.

from webots.

galou avatar galou commented on September 26, 2024

Candidates: #5978, #5676, #5774.

from webots.

galou avatar galou commented on September 26, 2024

A PROTO with Javascript rather than Lua suffers from the same symptoms.

from webots.

galou avatar galou commented on September 26, 2024

Can I debug the generated PROTO files (after going through the engine)?

from webots.

omichel avatar omichel commented on September 26, 2024

Yes, there is a menu in the scene tree allowing to see the generated proto file.

from webots.

galou avatar galou commented on September 26, 2024

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.

galou avatar galou commented on September 26, 2024

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.

omichel avatar omichel commented on September 26, 2024

I am not sure, but it could be the nodes that are passed as PROTO parameters.

from webots.

galou avatar galou commented on September 26, 2024

Do you mean a parameter whose type is a node?

from webots.

omichel avatar omichel commented on September 26, 2024

Yes.

from webots.

galou avatar galou commented on September 26, 2024

git bisect allowed to determine that the bug was introduced in b95a736 "Refactor node and PROTO creation (#5779)"

from webots.

omichel avatar omichel commented on September 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.