Bunny example for BNO055 not running

Post here about your Arduino projects, get help - for Adafruit customers!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
tgangi
 
Posts: 21
Joined: Fri Feb 12, 2016 9:11 pm

Bunny example for BNO055 not running

Post by tgangi »

I am having trouble getting the bunny example for the BNO055 to run. In Processing it says "Could not run the sketch (Target VM failed to initialize) and the problems it lists are:
The field PConstants.OPENGL is deprecated - line 30
Potential null pointer access: The variable availablePorts may be null at this location - line 48
The value of the parameter panel is not used - line 155
The value of the parameter even is not used - line 155
The value of the parameter even is not used - line 159
The value of the parameter even is not used - line 159

I'm using an Arduino Uno

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Bunny example for BNO055 not running

Post by adafruit_support_rick »

Those aren't errors. They're just warnings.
Which version of Processing are you using? Try processing 2.11 and ControlP5 version 2.0.4

User avatar
xiexin
 
Posts: 11
Joined: Tue Apr 25, 2017 4:36 am

Re: Bunny example for BNO055 not running

Post by xiexin »

I'm using processing 3.3 and I load the ControlP5 library.
I'm using an Arduino mega 2560

BUT I am also having trouble getting the bunny example for the BNO055 to run.As I rotate my breakout board, the rabbit should not rotate to reflect the movement of the breakout in 3D-space.(the rabbit stay still).As error following:
The field PConstants.OPENGL is deprecated
Potential null pointer access: The variable availablePorts may be null at this location
The value of the parameter panel is not used
The value of the parameter even is not used
The value of the parameter even is not used
The value of the parameter even is not used

User avatar
xiexin
 
Posts: 11
Joined: Tue Apr 25, 2017 4:36 am

Re: Bunny example for BNO055 not running

Post by xiexin »

2.1.1 of Processing ? I have loaded processing-2.2.1,But Processing 2.2.1 has issues with supporting 3D acceleration.

tgangi and adafruit_support_rick,How did you solve it?

User avatar
adafruit_support_rick
 
Posts: 35092
Joined: Tue Mar 15, 2011 11:42 am

Re: Bunny example for BNO055 not running

Post by adafruit_support_rick »

Are you getting this error from Processing 2.1.1?

Code: Select all

'NoClassDefFoundError: processing/awt/PGraphicsJava2D'
If not, then 2.1.1 should work for you.

That said, I'm not seeing those errors with Processing 3.3.2. Do you have the latest version of the BNO055 library?

User avatar
xiexin
 
Posts: 11
Joined: Tue Apr 25, 2017 4:36 am

Re: Bunny example for BNO055 not running

Post by xiexin »

I am getting this error from Processing 2.1.1('NoClassDefFoundError: processing/awt/PGraphicsJava2D')

I have the latest version of the BNO055 library,And I use the Processing 3.3.2 ,the Processing 3.3.2 have the errors as the Processing 3.3.

It can put x,y,z value , But the rabbit stay still.

User avatar
xiexin
 
Posts: 11
Joined: Tue Apr 25, 2017 4:36 am

Re: Bunny example for BNO055 not running

Post by xiexin »

I am getting this error from Processing 2.1.1
java.lang.NoClassDefFoundError: processing/awt/PGraphicsJava2D
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:926)
at processing.mode.java.runner.Runner.reportException(Runner.java:871)
at processing.mode.java.runner.Runner.exceptionEvent(Runner.java:797)
at processing.mode.java.runner.Runner$2.run(Runner.java:686)

User avatar
xiexin
 
Posts: 11
Joined: Tue Apr 25, 2017 4:36 am

Re: Bunny example for BNO055 not running

Post by xiexin »

???

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Bunny example for BNO055 not running

Post by ktownsend »

Please use Processing 2.2.1 with this sketch, there are breaking changes with newer versions.

User avatar
xiexin
 
Posts: 11
Joined: Tue Apr 25, 2017 4:36 am

Re: Bunny example for BNO055 not running

Post by xiexin »

I am getting this error from Processing 2.1.1
java.lang.NoClassDefFoundError: processing/awt/PGraphicsJava2D
java.lang.NullPointerException
at processing.mode.java.runner.Runner.findException(Runner.java:926)
at processing.mode.java.runner.Runner.reportException(Runner.java:871)
at processing.mode.java.runner.Runner.exceptionEvent(Runner.java:797)
at processing.mode.java.runner.Runner$2.run(Runner.java:686)

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Bunny example for BNO055 not running

Post by ktownsend »

Can you please try with 2.2.1 and let us know if that works for you?

User avatar
njr
 
Posts: 3
Joined: Sun May 21, 2017 3:00 pm

Re: Bunny example for BNO055 not running

Post by njr »

Hi, found this thread now. I can report the same error as xiexin using newly installed 2.2.1. on Windows 10 and an Arduino Uno.

The reported java error is just slightly different:

java.lang.RuntimeException: java.lang.NoClassDefFoundError: processing/awt/PGraphicsJava2D
at com.jogamp.common.util.awt.AWTEDTExecutor.invoke(AWTEDTExecutor.java:58)
at jogamp.opengl.awt.AWTThreadingPlugin.invokeOnOpenGLThread(AWTThreadingPlugin.java:103)
at jogamp.opengl.ThreadingImpl.invokeOnOpenGLThread(ThreadingImpl.java:206)
at javax.media.opengl.Threading.invokeOnOpenGLThread(Threading.java:172)
at javax.media.opengl.Threading.invoke(Threading.java:191)
at javax.media.opengl.awt.GLCanvas.display(GLCanvas.java:541)
at processing.opengl.PJOGL.requestDraw(PJOGL.java:688)
at processing.opengl.PGraphicsOpenGL.requestDraw(PGraphicsOpenGL.java:1651)
at processing.core.PApplet.run(PApplet.java:2256)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: processing/awt/PGraphicsJava2D
at cuberotate.setup(cuberotate.java:78)

For my results of using 3.3.3, see also my message "AHRS DEMO SKETCH ISSUE " at viewtopic.php?f=19&t=117590
in the other forum
viewforum.php?f=19.

BR

User avatar
ktownsend
 
Posts: 1447
Joined: Thu Nov 05, 2009 2:18 am

Re: Bunny example for BNO055 not running

Post by ktownsend »

The problem seems to be with G4P on Windows, which is used for the serial port selection dialogue boxes. Using G4P 3.5.2 on OS X this works fine, but it generates the specified error on Windows. We're looking into this, though.

User avatar
pburgess
 
Posts: 4161
Joined: Sun Oct 26, 2008 2:29 am

Re: Bunny example for BNO055 not running

Post by pburgess »

I don't have the hardware on-hand to test with, but was able to get the Processing code to not-crash on Windows...bunny displays, just doesn't rotate.

At the end of the setup() method in cuberotate, comment out this line:

Code: Select all

setSerialPort(serialList.getSelectedText());
And substitute the COM port corresponding to the board (can find this Windows' Device Manager panel), for example:

Code: Select all

setSerialPort("COM4");
Running current/latest everything: Windows 10, Processing 3.3.3, G4P library 4.1.2, OBJLoader.

User avatar
njr
 
Posts: 3
Joined: Sun May 21, 2017 3:00 pm

Re: Bunny example for BNO055 not running

Post by njr »

That's as far as I got as well with Processing 3.3.3 and Win10. In addition: the Processing IDE console did display the incoming serial stream (on COM8 in my case). But still the rabbit did not start responding to IMU movement.

It appears to my newbie eyes that the problem could be on the Processing side.

Hopefully the bug can be found.. looks like a seriously cool demo when it works ;)

BR

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino”