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

Challen's profile - activity

2017-10-30 13:10:58 -0500 received badge  Student (source)
2016-05-12 07:54:44 -0500 received badge  Famous Question (source)
2014-03-10 04:06:52 -0500 received badge  Notable Question (source)
2014-01-29 16:50:15 -0500 received badge  Famous Question (source)
2013-12-17 00:00:38 -0500 received badge  Popular Question (source)
2013-10-25 03:49:38 -0500 received badge  Notable Question (source)
2013-10-25 03:49:38 -0500 received badge  Popular Question (source)
2013-10-17 10:57:34 -0500 received badge  Famous Question (source)
2013-09-25 11:52:07 -0500 asked a question Humanoid localization won't work with Octomap

Hi, I'm creating a map using the octomap_server package, and I'm trying to using humanoid localization as my localization package. The robot I'm using is the iRobot Create, and I'm using the tf frames published by the turtlebot package as my torso frame (base_link) and odom frame. The package documentation says that it will work for a UAV, so I figure that it will also work for the Create. The localization isn't working. When I move the robot around in the environment I build for it, the published pose topic doesn't really show any consistent pattern with respect to where the robot is in the map. For example, I will move it in the positive x-direction, and the y position will start decreasing. I'm not sure if I'm doing something wrong. Here is the launch file I'm using to start the localization package: <launch>

<node pkg="mapping_3D" type="localize_transforms" name="transforms" />

<node pkg="hokuyo_node" type="hokuyo_node" name="hokuyo_node">
    <param name="frame_id" value="/hokuyo" />
</node>

<node pkg="octomap_server" type="octomap_server_node" name="octomap_server" args="$(find mapping_3D)/data/sept23_2.bt" />

<node pkg="humanoid_localization" type="localization_node" name="localization" >
    <rosparam file="$(find mapping_3D)/config/localization_params.yaml" command="load" />
</node>

</launch> The localize_transform simply broadcasts a transform from the base_link to the laser frame (hokuyo). And here's the yaml param file:

base_frame_id: base_link odom_frame_id: odom global_frame_id: vrpn init_global: true init_from_truepose: false use_raycasting: true initial_pose/x: 0.0 intial_pose/y: 0.0 intial_pose/z: 0.0 intial_pose/roll: 0.0 initial_pose/pitch: 0.0 initial_pose/yaw: 0.0 initial_std/x: 0.005 inital_std/y: .001 initial_std/z: .001 initial_std/roll: .005 initial_std/pitch: .005 initial_std/yaw: .005

Any advice on what might be going wrong here? Thanks, Challen

2013-08-09 12:19:16 -0500 received badge  Notable Question (source)
2013-08-09 06:14:22 -0500 commented answer Non-fully qualified frame_id

Thanks. It looks like that's going to work.

2013-08-09 05:33:07 -0500 received badge  Editor (source)
2013-08-09 04:52:05 -0500 received badge  Popular Question (source)
2013-08-08 13:32:28 -0500 asked a question Non-fully qualified frame_id

Hey all, I am trying to convert an incoming laser scan from a hokuyo urg laser scanner into a pointcloud for the purpose of building a octomap. Here is the code I'm working with, which is mostly from a tutorial:

class LaserScanToPointCloud {
  public:
    ros::NodeHandle node;
    laser_geometry::LaserProjection projector;
    tf::TransformListener listener;
    message_filters::Subscriber<sensor_msgs::LaserScan> laser_sub;
    tf::MessageFilter<sensor_msgs::LaserScan> laser_notifier;
    ros::Publisher scan_pub;

    LaserScanToPointCloud(ros::NodeHandle n): node(n), laser_sub(node, "scan", 10),
    laser_notifier(laser_sub, listener, "Brain5", 10) {
      laser_notifier.registerCallback(boost::bind(&LaserScanToPointCloud::scanCallback, this, _1));
      laser_notifier.setTolerance(ros::Duration(.01));
      scan_pub = node.advertise<sensor_msgs::PointCloud2>("my_cloud", 1);
    }

    void scanCallback (const sensor_msgs::LaserScan::ConstPtr& scan_in) {
      sensor_msgs::PointCloud2 cloud;
      try {
        projector.transformLaserScanToPointCloud("Brain5", *scan_in, cloud, listener);
      }
      catch(tf::TransformException& e) {
        std::cout << e.what();
        return;
      }
      std::cout << "publishing" << std::endl;
      scan_pub.publish(cloud);
/*      tf::TransformBroadcaster br;
      tf::Transform transform;
      transform.setOrigin(tf::Vector3(0, 0, 0));
      transform.setRotation(tf::Quaternion(0, 0, 0, 1));
      br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "map", "odom_combined"));*/
    }
};

int main(int argc, char** argv) {
  ros::init(argc, argv, "my_scan_to_cloud");
  ros::NodeHandle n;
  LaserScanToPointCloud lstopc(n);
  ros::spin();
  return 0;
}

The code works fine when the tf frame that I pass to the Message Filter is the same as the laser's frame. But I have issues when I try to add transforms from the laser frame (not fixed) to a fixed frame. When I add this extra frame, the code will sporadically spit out a pointcloud, but no where near the consistency when I just use one frame.

I get this warning every time I run the code, if it's important:

[ WARN] [1376004701.242796255]: Message from [/hokuyo_node] has a non-fully-qualified frame_id [laser]. Resolved locally to [/laser].  This is will likely not work in multi-robot systems.  This message will only print once.

Thanks in advance.

2013-08-07 21:10:10 -0500 received badge  Famous Question (source)
2013-08-07 12:35:42 -0500 commented question pub.publish(...) won't work

I guess my question is why is the cloud empty? I have checked that my scan data is coming in on the scan topic, and that the callback function is being called. So what would cause the cloud to not form completely?

2013-08-07 12:35:22 -0500 answered a question pub.publish(...) won't work

I guess my question is why is the cloud empty? I have checked that my scan data is coming in on the scan topic, and that the callback function is being called. So what would cause the cloud to not form completely?

2013-07-21 04:40:32 -0500 received badge  Notable Question (source)
2013-07-18 23:17:38 -0500 received badge  Popular Question (source)
2013-07-18 09:44:22 -0500 asked a question pub.publish(...) won't work

I am currently trying to learn how to use a laser scanner and point clouds, and I wrote code that should convert a laser scan message into a point cloud. Everything seems to work fine. My node subscribes to the /scan topic, and the laser scan data is converted to a point cloud. The problem is when I try to publish. When I make the call to pub.publisher (pub is the name of my publisher object), nothing happens. If I try to echo the /scan_cloud topic (the one I'm publishing to), nothing appears. Here is my code:

#include <ros/ros.h>
#include <sensor_msgs/PointCloud.h>
#include <laser_geometry/laser_geometry.h>
#include <tf/transform_listener.h>

laser_geometry::LaserProjection projector;
sensor_msgs::PointCloud _cloud;
bool firstMsg = 0;

void convert(const sensor_msgs::LaserScan::ConstPtr &scan) {
  sensor_msgs::PointCloud cloud;
  tf::TransformListener listener;
  projector.projectLaser(*scan, cloud);
  _cloud = cloud;
  firstMsg = 1;
}

int main(int argc, char **argv) {
  ros::init(argc, argv, "scan_test");
  ros::NodeHandle nh;
  ros::Subscriber sub = nh.subscribe("scan", 1000, convert);
  ros::Publisher pub = nh.advertise<sensor_msgs::PointCloud>("scan_cloud", 1000);
  ros::Rate loop_rate(10);
  while (ros::ok()) {
    std::cout << _cloud << std::endl;
    pub.publish(_cloud);
    ros::spinOnce();
    loop_rate.sleep();
  };
  return 0;
}

Thanks.

2013-07-08 09:57:27 -0500 asked a question Can I use OMPL for path planning/tutorial

Hi, I want to use the OMPL ros package to do some motion planning with a create and hokuyo laser scanner. But the ompl_ros_interface tutorial seems completely focused on moving a robotic arm. Is there a good place to start? I've been reading the OMPL's website tutorials as well.