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

Bei's profile - activity

2012-11-26 16:01:10 -0500 received badge  Famous Question (source)
2012-11-26 16:01:10 -0500 received badge  Popular Question (source)
2012-11-26 16:01:10 -0500 received badge  Notable Question (source)
2012-09-09 17:56:05 -0500 received badge  Student (source)
2012-09-09 17:55:47 -0500 received badge  Popular Question (source)
2012-09-09 17:55:47 -0500 received badge  Notable Question (source)
2012-09-09 17:55:47 -0500 received badge  Famous Question (source)
2011-11-29 13:47:20 -0500 marked best answer ROS application chooser keeps giving me error "The parameters on the server are not set"

You can set parameter against roscore on turtlebot

rosparam set robot/name pr1012
rosparam set robot/type pr2

robot/type must be either pr2 or turtlebot, and you can use arbitrarily word for robot/name

2011-11-29 13:47:20 -0500 received badge  Scholar (source)
2011-11-28 14:52:27 -0500 asked a question ROS application chooser keeps giving me error "The parameters on the server are not set"

Hi all, I've just downloaded the ROS application chooser. Then I ran roscore on my turtlebot and entered the master_uri into the ROS application chooser. But I have the following error when I try to connect to the uri:

Cannot contact ROS master: the parameters on the server are not set. Please set robot/name and robot/type

Is there a way to set those parameters? I couldn't set it in the app.

Thanks in advance!

-Bei

2011-11-27 04:30:28 -0500 answered a question Error in main.xml: could not find org.ros.android.views.RosTextView

I partially solved the problem by not creating the RosTextView in main.xml but instead creating it in my MainActivity.java:

rosTextView = new RosTextView(this);

Is this the only way?

-Bei

2011-11-23 08:09:16 -0500 asked a question Error in main.xml: could not find org.ros.android.views.RosTextView

Hi All,

I have the rosandroid pubsub tutorial installed in Eclipse and am trying to run it on my android phone. I was able to download the rosandroid sdk (android_gingerbread) and import the class files under android_gingerbread/bin/classes. So the project isn't giving me any error compiling it, but the main.xml is giving me this error:

The following classes could not be found:
- org.ros.android.views.RosTextView (Fix Build Path, Edit XML, Create Class)

Although I already have org.ros.android.views.RosTextView in my Build Path. Here's my pubsub MainActivity.java:

/*
 * Copyright (C) 2011 Google Inc.
 * 
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package org.ros.android.tutorial.pubsub;

import android.app.Activity;
import android.os.Bundle;
import org.ros.RosCore;
import org.ros.android.MessageCallable;
import org.ros.android.views.RosTextView;
import org.ros.node.DefaultNodeRunner;
import org.ros.node.NodeConfiguration;
import org.ros.node.NodeRunner;
import org.ros.tutorials.pubsub.R;
import org.ros.tutorials.pubsub.Talker;

/**
 * @author damonkohler@google.com (Damon Kohler)
 */
public class MainActivity extends Activity {

  private final NodeRunner nodeRunner;

  private RosCore rosCore;
  private RosTextView<org.ros.message.std_msgs.String> rosTextView;
  private Talker talker;

  public MainActivity() {
    nodeRunner = DefaultNodeRunner.newDefault();
  }

  @SuppressWarnings("unchecked")
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    rosTextView = (RosTextView<org.ros.message.std_msgs.String>) findViewById(R.id.text);
    rosTextView.setTopicName("/chatter");
    rosTextView.setMessageType("std_msgs/String");
    rosTextView
        .setMessageToStringCallable(new MessageCallable<String, org.ros.message.std_msgs.String>() {
          @Override
          public String call(org.ros.message.std_msgs.String message) {
            return message.data;
          }
        });
  }

  @Override
  protected void onResume() {
    super.onResume();
    try {
      rosCore = RosCore.newPrivate();
      rosCore.start();
      rosCore.awaitStart();
      NodeConfiguration nodeConfiguration = NodeConfiguration.newPrivate();
      System.out.println(rosCore.getUri());
      nodeConfiguration.setMasterUri(rosCore.getUri());
      talker = new Talker();
      nodeRunner.run(talker, nodeConfiguration);
      nodeRunner.run(rosTextView, nodeConfiguration);
    } catch (Exception e) {
      throw new RuntimeException(e);
    }
  }

  @Override
  protected void onPause() {
    super.onPause();
    nodeRunner.shutdown();
    rosCore.shutdown();
  }

}

I am very new to android programming and ros. Could anyone help me with this? Thank you so much in advance!!!