ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

android_tutorial_teleop crashes

asked 2012-10-09 23:08:56 -0600

steven7 gravatar image

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?

edit retag flag offensive close merge delete

Comments

Can you please provide an exact error message or even better a backtrace? (see http://ros.org/wiki/Support)

Lorenz gravatar image Lorenz  ( 2012-10-09 23:20:06 -0600 )edit

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

steven7 gravatar image steven7  ( 2012-10-11 20:35:19 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2013-02-13 16:11:11 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

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.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-10-09 23:08:56 -0600

Seen: 1,131 times

Last updated: Feb 13 '13