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

surajmshanbhag's profile - activity

2023-05-02 03:42:36 -0500 received badge  Good Question (source)
2022-02-03 01:37:14 -0500 received badge  Nice Question (source)
2019-05-20 02:10:02 -0500 marked best answer Minimum time between publishing a joint state and tf listener update

Hi,

I have 8 laser range finders propped up on a rotating vertical rod connected to a motor. The laser range finders is fixed to the sides of the rod at some 'xyz rpy' pose. I get the current angular position of the rod and use this to publish the joint state of the rod (which is free to rotate along the z axis). So when the motor runs in real world i can see the vertical rod and the lidar attached to it rotate as well in rviz.

Now at each instant of rotation i want to use tf to get the instantaneous pose of the lidar so that i can calculate the 3D point observed by the lidar. I create a point cloud each rotation of the lidar. Here is the code snippet i used for getting the tf.

this->rod_joint_state.header.stamp=ros::Time::now();
this->rod_joint_state.header.frame_id=this->my_frame_id;
this->rod_joint_state.position[0]=_DEG2RAD(this->rod_angle);
this->pub_joint.publish(this->rod_joint_state);

/* 10 lines of code including conditions and initilizations here */
for(int i=0;i<8;i++){
    try{
    this->tf_listener.waitForTransform(this->frame_id,lidar_n,ros::Time::now(), ros::Duration(0.000125));
    this->tf_listener.lookupTransform(this->frame_id,lidar_n,ros::Time(0),transformStamped);
    }
   /* calculate the 3D point using the tf*/

}

I do not have any problems getting the transforms. I do not get "Cannot lookup transform" or any other warning from the try block.
However when i set the timeout for waitForTransform to 0 (or no wait) , the point Cloud looks very random. When i set it to a higher value like 0.01s the point cloud starts to look like the environment it is scanning.
Scan with Delay: output as expected ..
Scan without delay: wierd output.
So my question is , is there a minimum time between publishing and listening to a joint state ? In my code there is very very less time between the two.

2018-11-15 07:42:17 -0500 received badge  Student (source)
2018-03-04 06:12:46 -0500 received badge  Notable Question (source)
2018-03-04 06:12:46 -0500 received badge  Popular Question (source)
2018-03-04 06:12:46 -0500 received badge  Famous Question (source)
2017-11-20 18:04:21 -0500 edited question Load Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure

Reload Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure Hello All, I have a motor controller boar

2017-11-20 18:03:50 -0500 edited question Load Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure

Reload Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure Hello All, I have a motor controller boar

2017-11-20 18:02:25 -0500 edited question Load Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure

Reload Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure Hello All, I have a motor controller boar

2017-11-20 18:01:34 -0500 edited question Load Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure

Reload Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure Hello All, I have a motor controller boar

2017-11-20 18:00:38 -0500 asked a question Load Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure

Reload Parameters using roslaunch saved as .yaml from RQT Dynamic Reconfigure Hello All, I have a motor controller boar

2017-11-14 13:38:07 -0500 received badge  Famous Question (source)
2017-09-27 17:57:02 -0500 commented answer Minimum time between publishing a joint state and tf listener update

Thank you @tfoote. THank you for linking me to MessageFilter. It was something i was looking for. I have already switche

2017-09-25 17:54:34 -0500 received badge  Notable Question (source)
2017-09-25 16:32:27 -0500 commented question Minimum time between publishing a joint state and tf listener update

@gvdhoorn Thank you for that insight.i had not known the difference. However i tried with both and results are still the

2017-09-25 04:39:16 -0500 received badge  Popular Question (source)
2017-09-25 00:20:39 -0500 received badge  Editor (source)
2017-09-25 00:20:39 -0500 edited question Minimum time between publishing a joint state and tf listener update

Minimum time between publishing a joint state and tf listener update Hi, I have 8 laser range finders propped up on a r

2017-09-25 00:15:04 -0500 edited question Minimum time between publishing a joint state and tf listener update

Minimum time between publishing a joint state and tf listener update Hi, I have a laser range finder propped up on a ro

2017-09-25 00:13:28 -0500 asked a question Minimum time between publishing a joint state and tf listener update

Minimum time between publishing a joint state and tf listener update Hi, I have a laser range finder propped up on a ro

2017-09-17 17:53:01 -0500 received badge  Famous Question (source)
2017-09-16 22:11:30 -0500 received badge  Notable Question (source)
2017-09-16 19:15:43 -0500 answered a question tf_echo is correct, yet no result from lookuptranform

I had a local scope for the buffer which made it fail. In the tutorials its mentioned "The TransformListener object shou

2017-09-16 18:23:41 -0500 answered a question Faster way to get stereo images at 640x480 from Raspberry pi

Using UDP for streaming. https://github.com/surajshanbhag/Indoor_SLAM

2017-09-16 18:09:39 -0500 commented question tf_echo is correct, yet no result from lookuptranform

I am having the exact same issue. using tf2 didnt help. Did you solve it ?

2017-09-16 18:08:03 -0500 received badge  Supporter (source)
2017-08-15 08:10:37 -0500 received badge  Popular Question (source)
2017-03-01 15:31:05 -0500 received badge  Enthusiast
2017-02-20 02:46:26 -0500 asked a question Faster way to get stereo images at 640x480 from Raspberry pi

Hello All,

I have connected 2 logitech C930e web cameras to a Raspberry Pi3 running a Ubuntu Mate and ROS Kinetic. I want to process the images on my laptop and only remotely see what the Pi sees using ROS.

Using uvc_camera package and some tweaks, I am able to publish 320x240 grayscale stereo frames at about 5fps.

Output of rostopic delay is as follows,

average: 221.12KB/s
    mean: 76.85KB min: 76.85KB max: 76.85KB window: 36
average: 221.80KB/s
    mean: 76.85KB min: 76.85KB max: 76.85KB window: 39

From iftop i can see that for 2s the used bandwidth is 3.65Mb.

Could anyone help me as to how i can increase the speed of the transfer. ? I want to be able to work at atleast 15fps.

Also is it possible to run a live video stream using gstreamer or flask and then publish it to ros from the host system. ?

Thank you !