GithubHelp home page GithubHelp logo

Exception in thread "Thread-5" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory when accesses Vitural bot in Opmode about virtual_robot HOT 2 CLOSED

beta8397 avatar beta8397 commented on August 24, 2024
Exception in thread "Thread-5" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory when accesses Vitural bot in Opmode

from virtual_robot.

Comments (2)

jkenney2 avatar jkenney2 commented on August 24, 2024

I'm assuming that you have added a method called getCbxConfig to the VirtualRobotController class. I'm also wondering whether you have added a setPosition method to the VirtualBot class. The VirtualBot class for this 2D simulator (virtual_robot) does not have such a method. Or, are you instead trying to do this on the 3D Physics-based simulator (vr_physics)? The solution to this issue will depend on which simulator you are working with. Either way, note that getVirtualBotInstance does not return the current robot; it creates an entirely new robot configuration object, which is not the object being manipulated in your active op mode. The VirtualRobotController class has a private field called bot, which is the current robot. You could add a public methed, getBot, and access the bot as follows: getVirtualRobotController().getBot();

If you are using the 2D simulator, you'll want a setPosition method in VirtualBot that is synchronized.

If you are using the 3D simulator, you'll need to call the setPosition method via a call to Platform.runLater, so it will execute on the UI thread.

from virtual_robot.

AJmods avatar AJmods commented on August 24, 2024

Thanks, it is now working.

from virtual_robot.

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.