0
$\begingroup$

Rosanswers logo

Hi guys, I am trying to run this example after successfully installing and building both rosjava_core and android_core. Then I am able to "import" the project to Eclipse and install it on my emulator with no error. However, whenever I touches the area around the joystick, the app crashes. This happens on my actual Android device as well (ASUS Eee Pad Transformers, with Android 4.0.6).

Does anyone how to solve the problem?

P/S: I do some diggings and one guy have the same problem but he solve it by adding the line currentVelocityCommand =publisher.newMessage();. I did try this method but the app crashes as well, maybe I added the line at the wrong place in VirtualJoystickView?


Originally posted by steven7 on ROS Answers with karma: 1 on 2012-10-09

Post score: 0


Original comments

Comment by Lorenz on 2012-10-09:
Can you please provide an exact error message or even better a backtrace? (see http://ros.org/wiki/Support)

Comment by steven7 on 2012-10-11:
I received the NullPointerException like the other guy http://answers.ros.org/question/44427/android-tutorial-teleop-problems/ here encountered. Anyway I tried adding the line in different location by trial and error and it seems like the joystick can now move but another issue arises. T

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

You should check 2 things:

1:The position you added the following line in "VirtualJoystickView.java":

currentVelocityCommand = publisher.newMessage();

I think you should add the next of this line: publisher = connectedNode.newPublisher("~cmd_vel", geometry_msgs.Twist._TYPE);

2:Whether you can rebuild "android_honeycomb_mr2" and add the jar file in your teleop package successfully.

in the root of "android_honeycomb_mr2" directory, type the following command again, ../gradlew debug and the same command in "android_teleop" directory.

If this doesn't work, I'll see the error messages in logcat.


Originally posted by KazutoMurase with karma: 116 on 2013-02-13

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.