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

kmb11's profile - activity

2015-05-26 06:41:39 -0500 received badge  Good Question (source)
2014-09-12 11:25:57 -0500 received badge  Nice Question (source)
2014-07-02 08:47:27 -0500 received badge  Famous Question (source)
2014-05-20 11:17:56 -0500 commented question Sending people_msgs from Kinect

Sorry, couldn't figure out a way to make it work!

2014-05-20 11:17:28 -0500 commented question PCL cloud upside down

Sorry, I didn't

2014-05-20 09:03:21 -0500 received badge  Famous Question (source)
2014-04-15 07:41:13 -0500 commented question Turtlebot path planner fails with added plugin

This question incorrectly models my situation, I will therefore close it.

2014-04-12 01:52:20 -0500 received badge  Famous Question (source)
2014-04-11 07:00:19 -0500 commented question Turtlebot path planner fails with added plugin

I've added all the files I thought to be relevant, please let me know if there are any others. Also, I have noticed that sometimes the goals work if I reboot the laptop and robot, but not always.

2014-04-10 13:08:29 -0500 received badge  Notable Question (source)
2014-04-10 04:55:36 -0500 received badge  Popular Question (source)
2014-04-10 04:30:27 -0500 commented question Turtlebot path planner fails with added plugin

Thank you for your reply, but "map.yaml" was just an example, I was using the command with the absolute path to the map.

2014-04-09 08:52:53 -0500 asked a question Turtlebot path planner fails with added plugin

EDIT: After recent trials, this question which my coworker has posted more fully describes this situation.

Hello,

I am working on navigation with a Turtlebot and have added a costmap layer that adds a lethal obstacle at all points that have been 1 metre in front of the robot. I added the plugin for this layer in the turtlebot_navigation package parameters, such that when AMCL runs, this layer is added to the costmap. I then launch AMCL (roslaunch turtlebot_navigation amcl_demo.launch map_file:=(path to map)/map.yaml, and Rviz displays the costmap with the added lethal obstacle. However, when I try to send a 2d nav goal (using either a node or with Rviz), it plans a path but does not execute the path. When I run a node to send a goal, I get "waiting for result" until I cancel it. In Rviz, the path is displayed, but the robot does not move (neither the real robot nor the Rviz robot). How can I successfully send 2d nav goals with this layer added?

The code for the layer I added is from this tutorial.

ROS Hydro, Ubuntu 12.04, Turtlebot 2

Thank you.

costmap_common_params.yaml:

max_obstacle_height: 0.60  # assume something like an arm is mounted on top of the robot
obstacle_range: 2.5
raytrace_range: 3.0
robot_radius: 0.1875
inflation_radius: 0.50

# voxel map configuration; z-voxels 0 are filled by bumpers and 1 by laser scan (kinect)
map_type: voxel
origin_z: 0.0
z_resolution: 0.2
z_voxels: 2
publish_voxel_map: false

observation_sources: scan bump

scan: {data_type: LaserScan, topic: scan, marking: true, clearing: true, min_obstacle_height: 0.25, max_obstacle_height: 0.35}
bump: {data_type: PointCloud2, topic: mobile_base/sensors/bumper_pointcloud, marking: true, clearing: false, min_obstacle_height: 0.0, max_obstacle_height: 0.15}

local_costmap_params.yaml:

local_costmap:
   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 5.0
   publish_frequency: 2.0
   static_map: false
   rolling_window: true
   width: 4.0
   height: 4.0
   resolution: 0.05
   transform_tolerance: 0.5
   robot_radius: 0.1875

global_costmap_params.yaml:

global_costmap:
   global_frame: /map
   robot_base_frame: /base_footprint
   update_frequency: 1.0
   publish_frequency: 0.5
   static_map: true
   transform_tolerance: 0.5
   robot_radius: 0.1875

move_base_params.yaml:

shutdown_costmaps: false

controller_frequency: 5.0
controller_patience: 3.0

planner_frequency: 1.0
planner_patience: 5.0

oscillation_timeout: 10.0
oscillation_distance: 0.2

base_local_planner_params.yaml:

TrajectoryPlannerROS:

# Robot Configuration Parameters
  max_vel_x: 0.3
  min_vel_x: 0.1

  max_vel_theta:  1.0
  min_vel_theta: -1.0
  min_in_place_vel_theta: 0.6

  acc_lim_x: 0.5
  acc_lim_theta: 1.0

# Goal Tolerance Parameters
  yaw_goal_tolerance: 0.3
  xy_goal_tolerance: 0.15

# Forward Simulation Parameters
  sim_time: 3.0
  vx_samples: 6
  vtheta_samples: 20

# Trajectory Scoring Parameters
  meter_scoring: true
  pdist_scale: 0.6
  gdist_scale: 0.8
  occdist_scale: 0.01
  heading_lookahead: 0.325
  dwa: true

# Oscillation Prevention Parameters
  oscillation_reset_dist: 0.05

# Differential-drive robot configuration
  holonomic_robot: false
  max_vel_y: 0.0
  min_vel_y: 0.0
  acc_lim_y: 0.0
  vy_samples: 0

amcl_demo.launch:

<launch>
  <include file="$(find turtlebot_bringup)/launch/3dsensor.launch">
    <arg name="rgb_processing" value="false" />
    <arg name="depth_registration" value="false" />
    <arg name="depth_processing" value="false" />

    <arg name="scan_topic" value="/scan" />
  </include>

  <!-- Map server -->
  <arg name="map_file" default="$(find turtlebot_navigation)/maps/willow-2010-02-18-0.10.yaml"/>
  <node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file ...
(more)
2014-04-04 12:23:02 -0500 received badge  Favorite Question (source)
2014-04-04 12:21:37 -0500 received badge  Notable Question (source)
2014-04-03 11:05:42 -0500 received badge  Scholar (source)
2014-04-03 11:05:27 -0500 received badge  Popular Question (source)
2014-04-03 11:05:27 -0500 received badge  Notable Question (source)
2014-04-03 10:33:48 -0500 received badge  Supporter (source)
2014-04-03 05:02:30 -0500 received badge  Popular Question (source)
2014-04-03 04:43:05 -0500 received badge  Famous Question (source)
2014-04-01 08:41:00 -0500 asked a question Sending people_msgs from Kinect

Hello,

I am running ROS Hydro on a TurtleBot, Ubuntu 12.04. I am trying to adjust the costmap based on locations of people using a proxemic layer code, found here. In order to do this I need to publish People messages (people_msgs) on the topic /people. I am currently thinking of doing so by modifying the main_ground_based_people_detection code (here) but I am open to any methods as I have no ideas as to how to publish this information from the kinect with or without the above mentioned people detection code.

Thank you in advance.

2014-03-25 10:48:53 -0500 received badge  Self-Learner (source)
2014-03-25 10:48:53 -0500 received badge  Teacher (source)
2014-03-25 10:08:47 -0500 answered a question ROS PCL visualizer fails on Turtlebot

I've figured it out, it turns out that the Intel Atom on the Turtlebot's computer doesn't support SSE4. The problem is that catkin_make creates cmake files that require SSE4, which is a problem when Eigen classes come in to play and require SSE. I changed all of the cmake files to execute their operations without using SSE4, then built it using make in the build folder instead of catkin_make.

2014-03-24 11:13:37 -0500 received badge  Notable Question (source)
2014-03-20 04:48:48 -0500 received badge  Student (source)
2014-03-20 04:48:38 -0500 received badge  Popular Question (source)
2014-03-17 10:49:49 -0500 asked a question ROS PCL visualizer fails on Turtlebot

Hello,

I am trying to run PCL visualizer on the turtlebot's computer such that it will subscribe to the Kinect and display a point cloud, and request three floor points from the mouse. It will use this to create and visualize a point cloud that detects people. This is from a PCL tutorial. The code I have used to run this is below. When I run the code on a separate computer that is directly connected to a Kinect, the visualizer runs fine. However, when I run it on the turtlebot, the initial point cloud is displayed, but after I input the three points and run the second point cloud, it exits and displays the following error:

Illegal instruction (core dumped)

Any thoughts? Here is the code.

Thank you!

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <ros/ros.h>
#include <pcl/console/parse.h>
#include <pcl/point_types.h>
#include <pcl/visualization/pcl_visualizer.h>    
#include <pcl/io/openni_grabber.h>
#include <pcl/sample_consensus/sac_model_plane.h>
#include <pcl/people/ground_based_people_detection_app.h>
#include <pcl/common/time.h>
#include <sensor_msgs/PointCloud2.h>
#include <pcl_conversions/pcl_conversions.h>

typedef pcl::PointXYZRGBA PointT;
typedef pcl::PointCloud<PointT> PointCloudT;

// PCL viewer //
pcl::visualization::PCLVisualizer viewer("PCL Viewer");

// Mutex: //
boost::mutex cloud_mutex;
bool new_cloud_available_flag;
enum { COLS = 640, ROWS = 480 };

int print_help()
{
  cout << "*******************************************************" << std::endl;
  cout << "Ground based people detection app options:" << std::endl;
  cout << "   --help    <show_this_help>" << std::endl;
  cout << "   --svm     <path_to_svm_file>" << std::endl;
  cout << "   --conf    <minimum_HOG_confidence (default = -1.5)>" << std::endl;
  cout << "   --min_h   <minimum_person_height (default = 1.3)>" << std::endl;
  cout << "   --max_h   <maximum_person_height (default = 2.3)>" << std::endl;
  cout << "   --sample  <sampling_factor (default = 1)>" << std::endl;
  cout << "*******************************************************" <<std::endl;
}

 PointCloudT::Ptr cloud(new PointCloudT);

void callback(const sensor_msgs::PointCloud2ConstPtr& msg){
   cloud_mutex.lock();
   sensor_msgs::PointCloud2 msg0 = *msg;
   PointCloudT cloud0;
   pcl::fromROSMsg(msg0, cloud0);
   *cloud = cloud0;
   new_cloud_available_flag = true;
   cloud_mutex.unlock();
 }

struct callback_args{
  // structure used to pass arguments to the callback function
  PointCloudT::Ptr clicked_points_3d;
  pcl::visualization::PCLVisualizer::Ptr viewerPtr;
};

void
pp_callback (const pcl::visualization::PointPickingEvent& event, void* args)
{
  struct callback_args* data = (struct callback_args *)args;
  if (event.getPointIndex () == -1)
    return;
  PointT current_point;
  event.getPoint(current_point.x, current_point.y, current_point.z);
  data->clicked_points_3d->points.push_back(current_point);
  // Draw clicked points in red:
  pcl::visualization::PointCloudColorHandlerCustom<PointT> red (data->clicked_points_3d, 255, 0, 0);
  data->viewerPtr->removePointCloud("clicked_points");
  data->viewerPtr->addPointCloud(data->clicked_points_3d, red, "clicked_points");
  data->viewerPtr->setPointCloudRenderingProperties(pcl::visualization::PCL_VISUALIZER_POINT_SIZE, 10, "clicked_points");
  std::cout << current_point.x << " " << current_point.y << " " << current_point.z << std::endl;
}

int main (int argc, char** argv)
{
  ros::init(argc, argv, "viewer_node");
  ros::NodeHandle n;
  new_cloud_available_flag = false;

  ros::Subscriber sub = n.subscribe<sensor_msgs::PointCloud2>("/camera/depth_registered/points", 1000, callback);

  if(pcl::console::find_switch (argc, argv, "--help") || pcl::console::find_switch (argc, argv, "-h"))
        return print_help();

  // Algorithm parameters:
  std::string svm_filename = "/usr/share/doc/libpcl-1.7-doc/doc/pcl-1.7/tutorials/sources/ground_based_rgbd_people_detection/data/trainedLinearSVMForPeopleDetectionWithHOG.yaml";
  float min_confidence = -1.5;
  float min_height = 1.3;
  float max_height = 2.3;
  float voxel_size = 0.06;
  float sampling_factor = 1;
  Eigen::Matrix3f rgb_intrinsics_matrix;
  rgb_intrinsics_matrix << 525, 0.0, 319.5, 0.0, 525, 239.5, 0.0, 0.0, 1.0; // Kinect RGB camera intrinsics ...
(more)
2014-03-15 07:22:05 -0500 received badge  Famous Question (source)
2014-03-15 07:22:05 -0500 received badge  Popular Question (source)
2014-03-15 07:22:05 -0500 received badge  Notable Question (source)
2014-03-14 04:56:40 -0500 asked a question PCL cloud upside down

Hello,

I have used a code from the PCL website that displays a Point Cloud from a Kinect using PCL Viewer. The Point Cloud that is displayed is upside down and is a fraction of the cloud that it would normally display. The exact same code works fine on an almost identical computer that does not have ROS installed, using the same Kinect. I am using Ubuntu 13.04 raring. I am wondering if the PCL code is interfering with ROS's PCL libraries. I have Hydro installed on this machine.

I have main.cpp in a src/ folder and am running the code from the build folder after making it.

Any help is appreciated, thank you in advance.

The code (main.cpp) I am running is as follows:

#include <iostream>

#include <pcl/io/openni_grabber.h>
#include <pcl/io/pcd_io.h>
#include <pcl/visualization/cloud_viewer.h>
#include <pcl/console/parse.h>

using namespace std;
using namespace pcl;

PointCloud<PointXYZRGBA>::Ptr cloudptr(new PointCloud<PointXYZRGBA>); // A cloud that will store colour info.
PointCloud<PointXYZ>::Ptr fallbackCloud(new PointCloud<PointXYZ>);    // A fallback cloud with just depth data.
boost::shared_ptr<visualization::CloudViewer> viewer;                 // Point cloud viewer object.
Grabber* kinectGrabber;                                               // OpenNI grabber that takes data from Kinect.
unsigned int filesSaved = 0;                                          // For the numbering of the clouds saved to disk.
bool saveCloud(false), noColour(false);                               // Program control.

void
printUsage(const char* programName)
{
   cout << "Usage: " << programName << " [options]"
        << endl
        << endl
        << "Options:\n"
        << endl
        << "\t<none>     start capturing from a Kinect device.\n"
        << "\t-v NAME    visualize the given .pcd file.\n"
        << "\t-h         shows this help.\n";
}

// This function is called every time the Kinect has new data.
void
grabberCallback(const PointCloud<PointXYZRGBA>::ConstPtr& cloud)
{
   if (! viewer->wasStopped())
       viewer->showCloud(cloud);

   if (saveCloud)
   {
       stringstream stream;
       stream << "inputCloud" << filesSaved << ".pcd";
       string filename = stream.str();
       if (io::savePCDFile(filename, *cloud, true) == 0)
       {
           filesSaved++;
           cout << "Saved " << filename << "." << endl;
       }
       else PCL_ERROR("Problem saving %s.\n", filename.c_str());

       saveCloud = false;
   }
}

// For detecting when SPACE is pressed.
void
keyboardEventOccurred(const visualization::KeyboardEvent& event,
   void* nothing)
{
   if (event.getKeySym() == "space" && event.keyDown())
       saveCloud = true;
}

// Creates, initializes and returns a new viewer.
boost::shared_ptr<visualization::CloudViewer>
createViewer()
{
   boost::shared_ptr<visualization::CloudViewer> v
       (new visualization::CloudViewer("3D Viewer"));
   v->registerKeyboardCallback(keyboardEventOccurred);

   return(v);
}

int
main(int argc, char** argv)
{
   if (console::find_argument(argc, argv, "-h") >= 0)
   {
       printUsage(argv[0]);
       return 0;
   }

   bool justVisualize(false);
   string filename;
   if (console::find_argument(argc, argv, "-v") >= 0)
   {
       if (argc != 3)
       {
           printUsage(argv[0]);
           return 0;
       }

       filename = argv[2];
       justVisualize = true;
   }
   else if (argc != 1)
   {
       printUsage(argv[0]);
       return 0;
   }

   viewer.resetCameraViewpoint("cloud"); 
   // First mode, open and show a cloud from disk.
   if (justVisualize)
   {
       // Try with colour information...
       try
       {
           io::loadPCDFile<PointXYZRGBA>(filename.c_str(), *cloudptr);
       }
       catch (PCLException e1)
       {
           try
           {
               // ...and if it fails, fall back to just depth.
               io::loadPCDFile<PointXYZ>(filename.c_str(), *fallbackCloud);
           }
           catch (PCLException e2)
           {
               return -1;
           }

           noColour = true;
       }

       cout << "Loaded " << filename << "." << endl;
       if (noColour)
           cout << "This file has no RGBA colour information present." << endl;
   }
   // Second mode, start fetching and displaying frames from Kinect.
   else
   {
       kinectGrabber = new OpenNIGrabber();
       if (kinectGrabber ...
(more)
2014-02-20 02:58:41 -0500 received badge  Enthusiast
2014-02-10 04:32:51 -0500 received badge  Editor (source)
2014-02-10 03:30:56 -0500 asked a question Cannot uninstall ROS Hydro and Groovy

Hi,

I'm currently trying to uninstall Hydro and Groovy from my Turtlebot computer but with no success. When I enter:

sudo apt-get remove ros-*

The last few lines of output I get are:

You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
turtlebot-env-groovy : Depends: turtlebot-ros
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

So I enter:

sudo apt-get -f install

and I get: ...

Do you want to continue [Y/n]? y
(Reading database ... 234613 files and directories currently installed.)
Removing turtlebot-env-groovy ...
Removing 'diversion of /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml to /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml.real by turtlebot-env-groovy'
dpkg-divert: error: rename involves overwriting `/usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml' with different file `/usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml.real', not allowed
dpkg: error processing turtlebot-env-groovy (--remove):
subprocess installed pre-removal script returned error exit status 2
postinst called with unknown argument `abort-remove'
Errors were encountered while processing:
turtlebot-env-groovy
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any thoughts? Thanks!