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

mdegges's profile - activity

2015-11-16 01:36:05 -0500 marked best answer Rosrun error

Quick question-

I'm trying to create a working subscriber to grab pointcloud data from my .bag file. 1. First I created a subscribe.cpp file in workspace/package_name. 2. Then I figured I'd use bag_to_pcd in pcl_ros to get all the pointcloud2 messages out of the .bag file and saved as .pcd files. (Is this necessary?) 3. Later, I can do the calculations I need to on each individual pointcloud.

Right now I'm having trouble with step #2. I did "rosrun pcl_ros bag_to_pcd test.bag /sensor_msgs/PointCloud2 pcd_dir" - I'm getting this error:

[code]Creating directory pcd_dir Saving recorded sensor_msgs::PointCloud2 messages on topic /sensor_msgs/PointCloud2 to pcd_dir Frame /tx90/base_link exists with parent NO_PARENT.[/code]

2014-07-31 18:57:46 -0500 received badge  Famous Question (source)
2014-01-28 17:29:20 -0500 marked best answer Installation error: "E:Unable to locate package ros-groovy"

I'm trying to install the full desktop version of ros on ubuntu 12.04, but I'm getting two errors:

Reading package lists... Done
mdegges@ubuntu:~$ sudo apt-get install ros-groovy desktop-full
Reading package lists... Done
Building dependency tree       
Reading state information... Done
**E: Unable to locate package ros-groovy
E: Unable to locate package desktop-full**

I'm new to linux & ros, so not sure how to proceed from here.

2014-01-24 21:32:03 -0500 received badge  Student (source)
2013-11-16 01:21:59 -0500 received badge  Famous Question (source)
2013-10-16 21:57:38 -0500 received badge  Notable Question (source)
2013-07-04 06:07:56 -0500 received badge  Famous Question (source)
2013-06-11 00:46:39 -0500 received badge  Notable Question (source)
2013-06-06 01:22:43 -0500 received badge  Famous Question (source)
2013-05-29 01:08:19 -0500 received badge  Notable Question (source)
2013-05-29 01:08:19 -0500 received badge  Popular Question (source)
2013-04-11 18:19:34 -0500 received badge  Popular Question (source)
2013-04-11 14:55:32 -0500 asked a question Displaying multiple pcd pointclouds in rviz

Is there a way to display multiple, separate pcd pointclouds (from pcd_to_pointcloud) on the same rviz screen?

I published the first pointcloud by doing: $ pcd_to_pointcloud first_pc.pcd .1 /cloud_pcd:=first_pc

The frame_id for this is base_link, so the pointcloud appears when I put /base_link as the fixed frame (under global options) and first_pc as the topic.

Then I try to publish the second pointcloud by doing: $ pcd_to_pointcloud second_pc.pcd .1 /cloud_pcd:=second_pc

When I run this, the first pointcloud stops publishing and I get an error saying 'New node registered with the same name'- I think because both pointclouds are being published on the same fixed_frame, /base_link- although they are publishing on different topics.

But when I try to change the frame id (to something like _frame_id:=/odom), I have to change the fixed frame to /odom to see the pointcloud in rviz, which is not good. I want to see all pointclouds (first_pc, second_pc, etc) on one rviz screen. Is that possible?

2013-04-11 14:29:32 -0500 commented answer Change topic on pcd_to_pointcloud

hey, I figured it out. I needed to change the namespace, and the directions were right there in your link. thanks for your help!!

2013-04-11 14:13:17 -0500 received badge  Commentator
2013-04-11 14:13:17 -0500 commented question Change topic on pcd_to_pointcloud

Edit: The above works fine if I want to look at just one pointcloud. I set the fixed frame to whatever (/base_link, in the wiki) and the topic stays as /cloud_pcd. But I can only view one cloud at a time in rviz. I would like to see multiple pointclouds on the same rviz screen.

2013-04-11 13:48:10 -0500 commented answer Change topic on pcd_to_pointcloud

What do you mean by 'the _is for parameters'?

2013-04-11 12:29:00 -0500 commented question Performing ICP between Pointclouds in C++

Figured it out. I just had some syntax errors- for ex, when I defined the global variable 'cloud_in', I forgot to make it a pointer.

2013-04-11 12:18:26 -0500 asked a question Change topic on pcd_to_pointcloud

Hi- Does anyone know how to change the topic that a pointcloud is being published on using pcd_to_pointcloud? On the wiki it only says you can change the frame_id, like so:

$ rosrun pcl_ros pcd_to_pointcloud cloud_file.pcd 0.1 _frame_id:=/odom

pcd_to_pointcloud publishes on the default /cloud_pcd topic, but I'd like to specify my own topic. I tried changing _frame_id:=/ to _topic:=/my_topic but that doesn't seem to work.

2013-04-11 11:44:42 -0500 received badge  Famous Question (source)
2013-04-09 21:57:59 -0500 received badge  Notable Question (source)
2013-04-09 18:58:21 -0500 commented question Performing ICP between Pointclouds in C++

Sorry- edited the question with the errors included. The CMakeLists.txt file is the default, except I added a line at the bottom to make the script executable.

2013-04-09 15:57:06 -0500 commented question Performing ICP between Pointclouds in C++

Ok- I posted the make errors on pastie: http://pastie.org/7397787

2013-04-09 15:49:24 -0500 received badge  Popular Question (source)
2013-04-09 15:43:12 -0500 received badge  Popular Question (source)
2013-04-09 07:44:29 -0500 received badge  Famous Question (source)
2013-04-09 07:43:52 -0500 asked a question Performing ICP between Pointclouds in C++

Hi-

I'm trying to create a script that takes in 2 bag files (fixed_frame and camera_frame), converts the ROS sensor_msgs/PointCloud2 data to pcl/PointCloud data, performs ICP between the pointcloud in fixed_frame and all the pointclouds in camera_frame, and publishes the results. Here is my code so far:

// Includes listed here

ros::Publisher _pub;
pcl::PointCloud<pcl::PointXYZ> cloud_in; 

void fixed_frame_cb (const sensor_msgs::PointCloud2ConstPtr& pc2_msg) {

  // Convert the sensor_msgs/PointCloud2 data to pcl/PointCloud
  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_in(
                           new pcl::PointCloud<pcl::PointXYZ>
                           );
  pcl::fromROSMsg ( *pc2_msg, *cloud_in );


}

void camera_frame_cb (const sensor_msgs::PointCloud2ConstPtr& next_pc2_msg) {

  // Convert the sensor_msgs/PointCloud2 data to pcl/PointCloud
  pcl::PointCloud<pcl::PointXYZ>::Ptr cloud2_in(
                           new pcl::PointCloud<pcl::PointXYZ>
                           );
  pcl::fromROSMsg ( *next_pc2_msg, *cloud2_in );

  // Perform ICP
  pcl::IterativeClosestPoint<pcl::PointXYZ, pcl::PointXYZ> icp;
  icp.setInputCloud(cloud2_in);
  icp.setInputTarget(cloud_in);
  pcl::PointCloud<pcl::PointXYZ> Final;
  icp.align(Final);

  // Convert the pcl/PointCloud to sensor_msgs/PointCloud2
  sensor_msgs::PointCloud2 output;
  pcl::toROSMsg( *cloud2_in, output );
  // Publish the results
  _pub.publish( output );

}

int main (int argc, char** argv) {

  // Initialize ROS
  ros::init (argc, argv, "my_script");
  ros::NodeHandle n( "~" );

  // Create ROS subscriber for fixed_frame topic
  ros::Subscriber sub = n.subscribe(
                    "/sr/pointcloud2/raw",
                    1,
                    fixed_frame_cb
                    );

  // Create ROS subscriber for camera_frame topic
  ros::Subscriber sub2 = n.subscribe(
                     "/sr/pointcloud2/raw",
                     1,
                     camera_frame_cb
                     );

  // Create ROS publisher for transformed pointcloud
  _pub = n.advertise<sensor_msgs::PointCloud2>(
                           "/iml_transform_point_cloud/transformed_point_cloud",
                           1
                           );

  // Spin
  ros::spin ();
}

I'm getting a lot of errors when I run 'make'. New to ros and c++, so I think these might just be syntax problems. Can anyone point me in the right direction? Thanks in advance.

Make errors:

mdegges@ubuntu:~/ros_workspace/iml_ros/my_script$ make mkdir -p bin cd build && cmake -Wdev -DCMAKE_TOOLCHAIN_FILE=/opt/ros/groovy/share/ros/core/rosbuild/rostoolchain.cmake .. [rosbuild] Building package my_script -- Using CATKIN_DEVEL_PREFIX: /home/mdegges/ros_workspace/iml_ros/my_script/build/devel -- Using CMAKE_PREFIX_PATH: /opt/ros/groovy -- This workspace overlays: /opt/ros/groovy -- Found gtest sources under '/usr/src/gtest': gtests will be built -- catkin 0.5.63 [rosbuild] Including /opt/ros/groovy/share/roscpp/rosbuild/roscpp.cmake [rosbuild] Including /opt/ros/groovy/share/rospy/rosbuild/rospy.cmake -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project:

CMAKE_TOOLCHAIN_FILE

-- Build files have been written to: /home/mdegges/ros_workspace/iml_ros/my_script/build cd build && make make[1]: Entering directory /home/mdegges/ros_workspace/iml_ros/my_script/build' make[2]: Entering directory /home/mdegges/ros_workspace/iml_ros/my_script/build' make[3]: Entering directory /home/mdegges/ros_workspace/iml_ros/my_script/build' make[3]: Leaving directory /home/mdegges/ros_workspace/iml_ros/my_script/build' [ 0%] Built target rospack_genmsg_libexe make[3]: Entering directory /home/mdegges/ros_workspace/iml_ros/my_script/build' make[3]: Leaving directory /home/mdegges/ros_workspace/iml_ros/my_script/build' [ 0%] Built target rosbuild_precompile make[3]: Entering directory /home/mdegges/ros_workspace/iml_ros/my_script/build' make[3]: Leaving directory /home/mdegges/ros_workspace/iml_ros/my_script/build' make[3]: Entering directory `/home/mdegges/ros_workspace/iml_ros/my_script/build' [100%] Building CXX object CMakeFiles/my_script.dir/src/example.cpp.o /home/mdegges/ros_workspace/iml_ros/my_script/src/example.cpp: In function ‘void camera_frame_cb(const PointCloud2ConstPtr ...

(more)
2013-03-12 10:06:22 -0500 commented question Pcl in ros tutorial

there are 2507 messages in my test.bag file, and 494 msgs under the /sr/pointcloud2_raw topic.

2013-03-12 00:10:07 -0500 received badge  Notable Question (source)