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

Pierre's profile - activity

2013-03-12 00:40:06 -0500 received badge  Famous Question (source)
2012-12-02 22:09:57 -0500 received badge  Supporter (source)
2012-12-02 10:39:39 -0500 received badge  Notable Question (source)
2012-11-23 23:29:43 -0500 received badge  Famous Question (source)
2012-11-20 07:05:40 -0500 received badge  Popular Question (source)
2012-11-20 06:11:20 -0500 answered a question PCL_tutorial, how to show the point cloud

Thank you Ed Venator. With input:=/camera/depth_registered/points that work perfectly.

"The PCL tutorial assumes you have a stereo vision system that does." What stereo vision system are you talking about?

2012-11-20 05:55:44 -0500 answered a question How to subscribe coordinates in the terminal / arduino?

OK, thank you for you advice. I used a geometry_msg

here the new code and that work perfectly:

#include <Servo.h>
#include <math.h> 
#include <ros.h>
#include <geometry_msgs/Point.h>

......  
......

ros::NodeHandle  nh;

void Moves_cb( const geometry_msgs::Point& cmd_msg){
Moves(cmd_msg.x,cmd_msg.y,cmd_msg.z); // Moves(x,y,z) it's a function witch move to the arm   to  the coordinates (x,y,z) using a linear trajectory
}
ros::Subscriber<geometry_msgs::Point> sub("Moves", Moves_cb);

void setup(){
 nh.initNode();
 nh.subscribe(sub);

 servo0.attach(8); 
 servo1.attach(9);
 servo2.attach(10);
 servo3.attach(11);
 Init();            // initialize the position of the robot 
 delay(2000); 
 }

 .......
 .......
2012-11-20 02:39:23 -0500 commented question How to subscribe coordinates in the terminal / arduino?

Sorry if it not clear. I used std_msgs::UInt16 just to check that the instruction I put in the terminal are correctly subscribe in Moves_cb. What i want to do, it's to change the code to subscribe the 3 coordinates in Moves_cb. I'll edit my question

2012-11-20 02:26:36 -0500 commented question PCL_tutorial, how to show the point cloud

I don't understand, because yesterday i tried it with input:=/camera/depth_registered/points and that produced an error on the openni_launch terminal. But today it works... Thank you so much for your help.

2012-11-20 00:10:33 -0500 received badge  Editor (source)
2012-11-19 20:37:12 -0500 received badge  Notable Question (source)
2012-11-19 07:56:47 -0500 received badge  Popular Question (source)
2012-11-19 05:56:01 -0500 received badge  Student (source)
2012-11-19 05:39:03 -0500 received badge  Organizer (source)
2012-11-19 05:26:11 -0500 commented question PCL_tutorial, how to show the point cloud

For the topic i subscribe i just followed the tutorial putting in the terminal: rosrun my_pcl_tutorial example input:=/narrow_stereo_textured/points2

2012-11-19 05:16:17 -0500 commented question PCL_tutorial, how to show the point cloud

I think so. I add a pointCloud2. And in the topic i selected the output(sensor_msgs/PointCloud2).

2012-11-19 04:27:59 -0500 asked a question PCL_tutorial, how to show the point cloud

Hello,

I am following the tutorial of PCL with ROS (www.ros.org/wiki/pcl/Tutorials).

When i launch the openni i can see the topic is publishing. But when i try to use it to see the result, nothing happen (only black screen is showed in the rviz window).

What i have to do to show the result?

here is the code i use:

#include <ros/ros.h>
// PCL specific includes
#include <pcl/ros/conversions.h>
#include <pcl/point_cloud.h>
#include <pcl/point_types.h>

#include <pcl/filters/voxel_grid.h>

ros::Publisher pub;

void cloud_cb (const sensor_msgs::PointCloud2ConstPtr& cloud){
sensor_msgs::PointCloud2 cloud_filtered;

 // Perform the actual filtering
pcl::VoxelGrid<sensor_msgs::PointCloud2> sor;
sor.setInputCloud (cloud);
sor.setLeafSize (0.01, 0.01, 0.01);
sor.filter (cloud_filtered);

// Publish the data
pub.publish (cloud_filtered);
}

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

 // Create a ROS subscriber for the input point cloud
ros::Subscriber sub = nh.subscribe ("input", 1, cloud_cb);

// Create a ROS publisher for the output point cloud
pub = nh.advertise<sensor_msgs::PointCloud2> ("output", 1);

// Spin
ros::spin ();
}

Thanks

--Pierre

2012-11-19 03:55:21 -0500 asked a question How to subscribe coordinates in the terminal / arduino?

Hello,

I am trying to subscribe a message to the Arduino using the terminal. The goal, is to control a little robot arm i have created, entering the coordinates in the terminal. I have no problem with the arduino part, but with the ROS part, it's a quite different...

I don't know how to do it.

Here is a part of my code:

#include <Servo.h>
#include <math.h> 
#include <ros.h>
#include <std_msgs/UInt16.h>

......  
......

ros::NodeHandle  nh;

void Moves_cb( const std_msgs::UInt16& cmd_msg){
Moves(cmd_msg.data,0,0); // Moves(x,y,z) it's a function witch move to the arm to the coordinates (x,y,z) using a linear trajectory
}
ros::Subscriber<std_msgs::UInt16> sub("Moves", Moves_cb);

void setup(){
  nh.initNode();
  nh.subscribe(sub);

  servo0.attach(8); 
  servo1.attach(9);
  servo2.attach(10);
  servo3.attach(11);
  Init();            // initialize the position of the robot 
  delay(2000); 
  }

 .......
 .......

In this code i have just subscribe a std_msgs::UInt16 to check if everything was working well (so i put y=0 and z=0 in the Moves function).

Now, i want to do subscribe the 3 coordinates (and not only one), but i have no idea to do this.

If some one have any idea.

Thanks

--Pierre