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

anamcarvalho's profile - activity

2023-04-24 12:43:12 -0500 received badge  Nice Question (source)
2023-04-24 12:41:16 -0500 received badge  Nice Question (source)
2017-08-08 20:35:56 -0500 received badge  Famous Question (source)
2016-05-08 15:28:40 -0500 marked best answer Size of topic in command line

Hi,

is it possible to know the size of a topic in the command line?

The topic I am dealing with should return 1920 values and I want to confirm that, without doing a cout in the code!

2016-03-15 12:40:32 -0500 received badge  Notable Question (source)
2016-02-24 15:41:11 -0500 received badge  Taxonomist
2015-09-10 13:42:09 -0500 received badge  Famous Question (source)
2015-05-23 14:00:29 -0500 marked best answer Subscribe and publish velocity

Hi,

I have a code where I want to see the linear velocity of a powered wheelchair and then publish linear velocity to it. An example of the code is:

ros::Publisher vel_pub_=n.advertise<geometry_msgs::Twist>("cmd_vel", 1);
if(vel.linear.x > 1.8){
    vel.linear.x = 1.8;
    vel_pub_.publish(vel);}

--UPDATE--

To subscribe to the cmd_vel topic I do:

ros::Subscriber vel_sub = n.subscribe("cmd_vel", 0, velCallback);

My question is... What do I insert in the velCallback function? What does it contain? What should the header of the function be?

Thank you!

2015-05-22 22:31:37 -0500 received badge  Famous Question (source)
2015-03-30 03:32:04 -0500 received badge  Famous Question (source)
2015-02-26 11:39:51 -0500 received badge  Popular Question (source)
2015-02-26 11:39:51 -0500 received badge  Notable Question (source)
2015-01-22 01:09:19 -0500 received badge  Famous Question (source)
2014-10-02 11:51:37 -0500 commented answer Depthimage_to_laserscan - choose which part of the image is scanned

int offset = (int)(cam_model.cy()-scan_height/2 - scan_height); This allows me to point to the first horizontal 1/3 of the kinect image! To point to the bottom 1/3 just change the last subtraction to a sum, and you will point to the center of the bottom area! cam_model.cy provides the center of img!

2014-10-02 11:51:26 -0500 commented answer Depthimage_to_laserscan - choose which part of the image is scanned

Hi @charkoteow, what I did was use the offset as a pointer to the area I wanted to scan! I wanted 3 scans for 3 different areas, so I needed 3 different depthimage_to_laserscan... I simply changed the name of the topic each one provided and changed the following line of the code:

2014-10-02 11:51:03 -0500 commented answer Depthimage_to_laserscan - choose which part of the image is scanned

int offset = (int)(cam_model.cy()-scan_height/2 - scan_height); This allows me to point to the first horizontal 1/3 of the kinect image! To point to the bottom 1/3 just change the last subtraction to a sum, and you will point to the center of the bottom area! cam_model.cy provides the center of img!

2014-10-02 11:49:07 -0500 commented answer Depthimage_to_laserscan - choose which part of the image is scanned

Hi @zeinab, what I did was use the offset as a pointer to the area I wanted to scan! I wanted 3 scans for 3 different areas, so I needed 3 different depthimage_to_laserscan... I simply changed the name of the topic each one provided and changed the following line of the code:

2014-09-23 14:52:51 -0500 received badge  Famous Question (source)
2014-09-16 10:26:03 -0500 received badge  Notable Question (source)
2014-09-09 22:55:17 -0500 marked best answer Depthimage_to_laserscan - choose which part of the image is scanned

Hi everyone!

I am using the package depthimage_to_laserscan. In this package is possible to change the parameter scan height to 480 (the height of the kinect depth image).

What I wanted to do is the following: I want the to obtain three 2D planes, instead of just one. For this to happen I need to divide the kinect depth image in 3, and scan each 1/3 of the image separately. So, I want one 2D scan for the bottom 1/3 of the kinect depth image, one for the top 1/3 and one for the center 1/3.

The problem is that when setting the scan height, even if I give it the value of 480/3, it will scan 480/3 rows, starting from the center of the image, meaning I can't get the top 1/3 scan and neither the bottom 1/3 scan!

How can I do this?

I hope my explanation wasn't very confusing! I would be grateful if you could help me on this issue!

2014-09-04 08:23:46 -0500 asked a question Slow Kinect frame rate in openni parameters

Hi everyone,

I would like to change the Kinect's frame rate in openni_launch parameters! If this is possible, what parameter do I change?

If not, how can I do this?

Thanks!

2014-09-04 05:40:47 -0500 received badge  Famous Question (source)
2014-09-03 18:38:35 -0500 received badge  Popular Question (source)
2014-09-02 10:01:46 -0500 answered a question robot is not algined to the laser scanner frame

You have to define a Reference Frame in Grid... It might solve your problem if you choose "laser" as a reference frame!

2014-09-02 08:24:07 -0500 commented question robot is not algined to the laser scanner frame

What is the Reference Frame in "Grid"?

2014-09-02 08:22:34 -0500 asked a question Gmapping - entropy has fixed value

Hi everyone!

I run gmapping with Hokuyo laser scanner. I published the transforms this way, so I can't really estimate the position in the map, but it works for a static position, and if I move the laser it updates the map, assuming the laser is in the same position. The transforms:

<launch>
  <node pkg="tf" type="static_transform_publisher" name="odom_to_base_link" args="0 0 0 0 0 0 odom base_link 100" />
  <node pkg="tf" type="static_transform_publisher" name="US6" args="0 7 2 1.5708 0 0 base_link laser 100" />
</launch>

When I run gmapping and do rostopic echo /slam_gmapping/entropy, this is what it ALWAYS outputs, even if the map changes and becomes more occupied: data: 3.4119738166.

If you know how to update the entropy with the movement of the laser, I would appreciate your help! Thank you!

2014-09-02 08:16:40 -0500 commented answer Hokuyo - No map received in RViz

Thank you Malefitz, it works =) now I have another question but i'll open a new one, since it isn't related with the transforms!

2014-09-02 04:41:21 -0500 commented answer Hokuyo - No map received in RViz

Thank you @Malefitz, really appreciate it!

2014-09-01 05:41:24 -0500 received badge  Notable Question (source)
2014-08-31 13:53:58 -0500 commented answer Hokuyo - No map received in RViz

But isn't that the one I already simulate?

2014-08-31 10:42:20 -0500 commented answer Hokuyo - No map received in RViz

<launch> <node pkg="tf" type="static_transform_publisher" name="link1_broadcaster" args="1 0 0 0 0 0 link1_parent link1 100"/> </launch>

what do I write in link1_broadcaster, link1_parent and link1?

2014-08-31 10:42:11 -0500 commented answer Hokuyo - No map received in RViz

@bvbdort Since I don't have odometry, the second transform was the one I "simulated".

For the first one, does this exact transform in the tf static_transform_publisher ros page solves? (next comment)

2014-08-29 18:10:55 -0500 received badge  Popular Question (source)
2014-08-28 15:17:46 -0500 asked a question Hokuyo - No map received in RViz

Hi everyone!

I am trying to use the package "GMapping" to visualize the map acquired with Hokuyo laser scanner!

I have no odometry, so I simulated a TF with a launch file, which worked already in other applications!

<launch>

  <node pkg="tf" type="static_transform_publisher" name="US6" args="0 7 2 1.5708 0 0 base_link laser 100" />

</launch>

When running RViz, in Global Options, the Fixed frame is map; In Grid, the Reference Frame is map; In TF I have the following warnings: No transform from [map] to [base_link] / No transform from [odom] to [base_link] In map, the topic is map and I receive this warning and error message: No map received / No transform from [] to [base_link]

What did I do wrong? I notice that if I change the Fixed Frame in Global Options and the one in Grid, the error disappear and some other errors appear... what are the correct options to be selected in Global Options and in Grid?

Thank you for your time!

2014-08-28 07:36:30 -0500 commented answer Gmapping - just the last scan mapped

Thank you so much Malefitz, i'll try your approach and give you feedback! One thing: registerScan isn't a function? Shouldn't I put the break inside that function or something?

2014-08-26 21:04:08 -0500 received badge  Notable Question (source)