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

dberm22's profile - activity

2016-10-17 17:08:17 -0500 received badge  Enlightened (source)
2016-10-17 17:08:17 -0500 received badge  Good Answer (source)
2016-10-17 17:08:09 -0500 received badge  Nice Question (source)
2014-01-30 05:51:52 -0500 received badge  Nice Answer (source)
2014-01-28 17:29:22 -0500 marked best answer Skip Master Chooser

I am developing an android app with rosjava, and I am setting the Master URI programatically. Therefore, the Master Chooser screen does nothing for me. Is there a way I can skip it totally?

2014-01-28 17:29:13 -0500 marked best answer rosjava: Get List of Parameters

I am developing with ros on an android tablet, and I am trying to change parameters using the device (as a remote, so to speak). However, I am having trouble doing so. Has anyone done this?

Here is my attempt:

    NodeConfiguration nodeConfiguration = NodeConfiguration.newPublic( InetAddressFactory.newNonLoopback().getHostAddress());
    nodeConfiguration.setMasterUri(URI.create(IP_ADDRESS));
    ListView ParamListView = (ListView) findViewById(R.id.ParamListView);
    final String[] NodeName = url.split("=");
    ScheduledExecutorService scheduledExecutorService = Executors.newScheduledThreadPool(Integer.MAX_VALUE);
    NodeFactory nodeFactory = new DefaultNodeFactory(scheduledExecutorService);
    Node node = nodeFactory.newNode(nodeConfiguration);
    ConnectedNode connectednode = (ConnectedNode) node;
    final ParameterTree ParamList = connectednode.getParameterTree();
    //final ParameterTree ParamList = (ParameterTree) new ArrayList<String>();
    @SuppressWarnings("unchecked")
    List<String> ParamJavaList = (List<String>) ParamList.getList(NodeName[1]);
    final ArrayAdapter<String> ParamListAdapter = new ArrayAdapter<String>(this, android.R.id.text1, ParamJavaList);
    ParamListView.setAdapter(ParamListAdapter);

What am I doing wrong? I am not sure how to copy and paste my error log, but the error is is occurring before my call of getList().

If I uncomment the commented line and comment out the 5 lines before it, I get an error saying I cannot cast from ArrayList to ParameterTree. That is how I got to this convoluted point of trying to initialize the ParamList using getParameterTree(), which requires access to the connected node.

I am sure there is an easier way to do this, but I am not aware of it.

Thanks in advance!

2013-07-16 02:45:23 -0500 received badge  Famous Question (source)
2013-06-14 09:45:52 -0500 received badge  Famous Question (source)
2013-06-14 03:31:02 -0500 commented answer Mixing pcl versions inside ros?

Yup, downloading the source, editing the cmake files to not include those checks, and recompiling did the job. Not sure why those flags should matter as my pcl is sse compatible, but either way, it's working.

2013-06-14 01:30:19 -0500 commented answer Mixing pcl versions inside ros?

I wasn't sure if that flag was the only difference, so I didn't take the time to download the new source, edit the file, and then recompile myself. Plus, my laptop is a brand new aienware with SSE support...so I have no idea if it'll help.

2013-06-14 01:27:47 -0500 received badge  Notable Question (source)
2013-06-13 10:01:02 -0500 commented answer Mixing pcl versions inside ros?

I was able to get it working by backporting the functions from 1.7 into 1.5. Hopefully there will be a patch to 1.7 before I need to backport any more functions. Thanks anyway.

2013-06-13 06:11:00 -0500 commented answer Mixing pcl versions inside ros?

I said in my post that I tried 1.7. I updated it 2 days ago..the patch is not applied, so it doesn't work.

2013-06-12 22:33:14 -0500 received badge  Popular Question (source)
2013-06-12 03:01:00 -0500 asked a question Mixing pcl versions inside ros?

I am trying to use RegionGrowingRGB and other functions which are available in pcl 1.7 but not 1.5. The issue I am having is that 1.7 does not contain the recent patch that was applied to 1.5 (which solved my segfault issue here).

My question is, is there any way I can mix versions in my code? I either want to use 1.5 but be able to call functions implemented in 1.7, or use 1.7 but be able to use the 1.5 version of files which were affected by the patch. Is there any easy way to do this?

I don't think I can simply copy the missing files into the 1.5 directory because I'm sure there are tons of dependencies.

2013-06-11 09:51:34 -0500 received badge  Notable Question (source)
2013-06-11 03:20:43 -0500 commented answer Illegal Instruction when reading PCD/PLY files readHeader()

while technically you are correct, that didn't help me solve the issue on THIS computer. See the comments on the accepted answer. Thanks anyway.

2013-06-11 02:59:22 -0500 commented answer Illegal Instruction when reading PCD/PLY files readHeader()

You are mostly correct. I updated to pcl-1.7 thinking that the changes made to 1.5 would be reflect in 1.7, but they were not. I downloaded the new version of 1.5 from here http://50.28.27.175/repos/building/pool/main/r/ros-fuerte-pcl/ and it worked like a charm. I will update the rest now. Thanks!

2013-06-07 09:15:58 -0500 received badge  Popular Question (source)
2013-06-06 03:07:59 -0500 asked a question Illegal Instruction when reading PCD/PLY files readHeader()

EDIT I've narrowed down the issue to reading of PCD/PLY files, so the question has basically changed...

I have been stuck on this issue for days, and finally I've given up and decided to ask for help:

I am trying to run a variation of my_pcl_tutorial, but instead of receiving a point cloud via subscription, I am still setting up a subscriber, but then reading the cloud from a pcb file and then publishing it (via a message forwarder node to avoid sub/pub of the same topic on a single node) on the same topic I am subscribing to. Here is my main():

int main (int argc, char** argv)
{
  // Initialize ROS
  ros::init (argc, argv, "my_pcl_tutorial");

  // Load from file
   pcl::PointCloud<pcl::PointXYZ>::Ptr pcloud(new pcl::PointCloud<pcl::PointXYZ>);
  //sensor_msgs::PointCloud2::Ptr pcloud(new sensor_msgs::PointCloud2);
  if ( pcl::io::loadPCDFile<pcl::PointXYZ> ("/home/user/Documents/table_scene_lms400.pcd", *pcloud) == -1) // load the file
  {
    std::cout << "Couldn't read file!\n";
    return (-1);
  }
  std::cout << "Loaded " << pcloud->points.size () << " points." << std::endl;

  //set up publishers and subscribers
  ros::NodeHandle nh;// = ros::NodeHandle(ros::this_node::getName());
  ros::Duration(5).sleep();
  ros::Publisher pubcloud = nh.advertise<sensor_msgs::PointCloud2> ("/inputforwarder", 1);
  ros::Subscriber sub = nh.subscribe ("/input", 1, cloud_cb);
  //puboutput = nh.advertise<sensor_msgs::PointCloud2> ("/output", 1);
  puboutput = nh.advertise<pcl::ModelCoefficients> ("/output", 1);
  ros::Duration(5).sleep();

  //publish cloud
  sensor_msgs::PointCloud2 pc2;
  pcl::toROSMsg(*pcloud, pc2);
  pubcloud.publish(pc2);

  // Spin
  ros::spin ();

  return (0);
}

Which gives me the error on my loadPCDFile():

Starting program: /home/user/ros_workspace/my_pcl_tutorial/bin/example 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".

Program received signal SIGILL, Illegal instruction.
0x00007ffff6f4b1a1 in pcl17::PCDReader::readHeader(std::string const&, sensor_msgs::PointCloud2_<std::allocator<void> >&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int&, unsigned int&, int) ()
   from /home/user/ros_workspace/fuerte-unstable-devel/pcl17/lib/libpcl_io.so.1.7
(gdb) bt
#0  0x00007ffff6f4b1a1 in pcl17::PCDReader::readHeader(std::string const&, sensor_msgs::PointCloud2_<std::allocator<void> >&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int&, unsigned int&, int) ()
   from /home/user/ros_workspace/fuerte-unstable-devel/pcl17/lib/libpcl_io.so.1.7
#1  0x00007ffff6f48af4 in pcl17::PCDReader::read(std::string const&, sensor_msgs::PointCloud2_<std::allocator<void> >&, Eigen::Matrix<float, 4, 1, 0, 4, 1>&, Eigen::Quaternion<float, 0>&, int&, int) ()
   from /home/user/ros_workspace/fuerte-unstable-devel/pcl17/lib/libpcl_io.so.1.7
#2  0x000000000044e9f4 in pcl17::PCDReader::read<pcl17::PointXYZ> (
this=0x7fffffffd970, file_name=..., cloud=..., offset=0)
at /home/user/ros_workspace/fuerte-unstable-devel/pcl17/include/pcl-1.7/pcl17/io/pcd_io.h:209
#3  0x000000000044af8e in pcl17::io::loadPCDFile<pcl17::PointXYZ> (
file_name=..., cloud=...)
    at /home/user/ros_workspace/fuerte-unstable-devel/pcl17/include/pcl-1.7/pcl17/io/pcd_io.h:544
#4  0x0000000000445afd in main (argc=1, argv=0x7fffffffdd38)
at /home/user/ros_workspace/my_pcl_tutorial/src/example.cpp:72

which boils down to an issue in readHeader().

It is finding the file just fine, in case you were wondering. I've tried multiple PCD and PLY ... (more)

2013-03-26 07:28:03 -0500 received badge  Scholar (source)
2013-03-15 06:00:48 -0500 received badge  Famous Question (source)
2013-03-15 05:59:56 -0500 received badge  Famous Question (source)
2013-03-11 06:45:25 -0500 answered a question classnotfoundexception on pubsub tutorial

Your error starts here:

04-09 10:58:24.915: E/AndroidRuntime(343): java.lang.RuntimeException: Unable to start activity ComponentInfo{org.ros.tutorials.pubsub/org.ros.android.tutorial.pubsub.MainActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class org.ros.android.views.RosTextView

If you notice, you have both "org.ros.tutorials.pubsub" and "org.ros.tutoral.pubsub". (notice the extra/lack-of "s" in tutorials). Check to see if your spelling is correct.

Also, check the manifest to see if everything is in there and spelled correctly.

But I agree, first make sure you followed the instructions first: http://docs.rosjava.googlecode.com/hg/android_core/html/index.html

--Edit--

I may be completely wrong with this next part, but you have

04-09 10:58:24.684: I/dalvikvm(343): Failed resolving Lorg/ros/android/NodeRunnerService; interface 142 'Lorg/ros/node/NodeMainExecutor;'

Is it supposed to be "org" or "Lorg"?

2013-02-25 05:07:23 -0500 received badge  Teacher (source)
2013-02-25 05:07:23 -0500 received badge  Self-Learner (source)
2013-02-25 05:02:28 -0500 received badge  Notable Question (source)
2013-02-25 04:31:26 -0500 answered a question Skip Master Chooser

Thanks to Kazuto for the lead, but there are a few issues with his answer. I was able to solve them with the included code. First, I changed startMasterChooser in RosActivity.java to public, and then pasted this code into my activity:

@Override
  public void startMasterChooser() {

    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
    String masterURI = prefs.getString("masterURI", "http://192.168.1.113:11311");

    Intent data = new Intent();
    data.putExtra("ROS_MASTER_URI", masterURI);
    onActivityResult(0, RESULT_OK, data);

  }

Alternatively, you can just hardcode the masterURI...I chose to have it as a preference. Hopefully changing the RosActivity code doesn't have any effect on future work.