gok03 / rosjava

Automatically exported from code.google.com/p/rosjava
0 stars 0 forks source link

android_tutorial_teleop null pointer exception on contact #109

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Install and Build rosjava_core and android_core as per insctructions
2.Install android_tutorial_teleop (adb install MainActivity-debug.apk)
3.Run Application, connect to roscore. Touch virtual joystick

What is the expected output? What do you see instead?
Joystick should react to touch event, send messages over cmd_vel topic
instread application crashes, and logcat says 

FATAL EXCEPTION: main
java.lang.NullPointerException at 
org.ros.android.view.VirtualJoystickView.publishVelocity(VirtualJoystickView.jav
a:799)
org.ros.android.view.VirtualJoystickView.onContactMove(VirtualJoystickView.java:
698)
org.ros.android.view.VirtualJoystickView.onTouchEvent(VirtualJoystickView.java:3
56)
android.view.View.dispatchTouchEvent(View.java:5546)

What version of the product are you using? On what operating system?
I have tried with several versions to get the same result, including 
400149595dba. Also used on three different machines, all running Ubuntu. 

Please provide any additional information below.
The application correctly connects to roscore, touch events on the screen work 
just fine however when you touch the joystick it fires a null pointer 
exception. 

Original issue reported on code.google.com by Allspa...@gmail.com on 26 Apr 2012 at 3:22

GoogleCodeExporter commented 9 years ago
I had same problem in the tutorial.
I guess...
A Message "currentVelocityCommand" for virtual joystick is null.
I tried...
" currentVelocityCommand =publisher.newMessage();"  

It works..

Original comment by jaeh...@gmail.com on 5 May 2012 at 5:26