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

lotfishtaine's profile - activity

2022-02-23 13:56:04 -0500 marked best answer TF_OLD_DATA error when I publish a new topic.

Hello,

I'm trying to create a map of the environment using pcl_ndt. I use data from simulated velodyne in gazebo. I'm subscribing to PointCloud2 msg and publishing the genrated map via PointCloud2 msg in new topic /ndt_map

However, after a few seconds of publishing /nadt_map topic, I got this warning :

Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 36,221 according to authority /ndt_map
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
         at line 277 in /tmp/binarydeb/ros-melodic-tf2-0.6.5/src/buffer_core.cpp

I already used this command that should have solved the problem:

rosparam set use_sim_time true

but the error still persist.

I saw that this could happen when reproducing bagfile, but for my case, I'm using online data from the gazebo simulator.

Thanks for helping shedding light on this issue!

UPDATE: this is my callback :

void pts_callback(const sensor_msgs::PointCloud2::ConstPtr& input){
        // Convert the sensor_msgs/PointCloud2 data to pcl/PointCloud
        pcl::fromROSMsg(*input, cloud);

        ndt.align(*outputCloud, init);

        // Get the transformation matrix
        t = ndt.getFinalTransformation();

        // Transforme the cloud with the transformation matrix
        pcl::transformPointCloud(cloud, *transformed_cloud, t);

    tf::TransformBroadcaster br;
        tf::Transform transform;

    //create tf transform from t
    transform = get_tf_transform(t);

        br.sendTransform(tf::StampedTransform(transform, input->header.stamp, "world", "base_link"));

        sensor_msgs::PointCloud2::Ptr map_msg(new sensor_msgs::PointCloud2);
        pcl::toROSMsg(*transformed_cloud, *map_msg);

        ndt_pub.publish(*map_msg);
}

I'm subscribing to VelodyneScan packets with :

points_sub_ = nd.subscribe("velodyne_points", 100000, &pts_callback, this);

and I publish map with :

ndt_pub = nd.advertise<sensor_msgs::PointCloud2>("ndt_map", 1000);
2021-06-08 07:13:28 -0500 received badge  Self-Learner (source)
2021-04-06 08:53:17 -0500 received badge  Good Answer (source)
2021-01-19 22:36:42 -0500 received badge  Nice Answer (source)
2020-12-18 02:04:44 -0500 received badge  Necromancer (source)
2020-06-02 13:51:44 -0500 received badge  Famous Question (source)
2020-04-29 18:20:12 -0500 received badge  Notable Question (source)
2020-04-07 07:33:52 -0500 received badge  Popular Question (source)
2020-03-10 01:49:58 -0500 received badge  Famous Question (source)
2020-02-13 04:25:00 -0500 received badge  Notable Question (source)
2020-01-24 04:22:18 -0500 commented question get rotation state of a joint with tf::listener.lookupTransform

I tried with ros::Time() tf::TransformListener listener; tf::StampedTransform transform; try{ listener.waitForTran

2020-01-24 04:03:43 -0500 commented question get rotation state of a joint with tf::listener.lookupTransform

I tried with ros::Time() tf::TransformListener listener1; tf::StampedTransform transform; try{ listener1.waitForTr

2020-01-24 04:03:43 -0500 received badge  Commentator
2020-01-23 09:33:03 -0500 asked a question get rotation state of a joint with tf::listener.lookupTransform

get rotation state of a joint with tf::listener.lookupTransform Hello everyone, I have a velodyne with a rotating joint

2019-12-13 00:08:08 -0500 received badge  Popular Question (source)
2019-12-12 09:16:14 -0500 marked best answer How to control a rotating joint in velocity

Hello everyone,

I'm trying to control a rotating joint type "continuous" in velocity, and simulate it in Gazebo.

This is the URDF joint definition:

<joint name="${name}_joint" type="continuous"> 
      <xacro:insert_block name="origin" />
      <parent link="${namespace}/${parent}"/>
      <child link="${namespace}/${name}"/>
      <axis xyz="1 0 0" rpy="0 0 0" />
      <limit effort="2000.0" velocity="40.0" />
    </joint>

    <gazebo>
      <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
        <robotNamespace>${namespace}</robotNamespace>
      </plugin>
    </gazebo>

    <transmission name="${name}_joint_trans">
      <type>transmission_interface/SimpleTransmission</type>
      <joint name="${name}_joint">
        <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
      </joint>
      <actuator name="${name}_joint_motor">
        <hardwareInterface>hardware_interface/VelocityJointInterface</hardwareInterface>
        <mechanicalReduction>1</mechanicalReduction>
      </actuator>
    </transmission>

and the config yaml file for controllers:

 joint_state_controller:
    type: joint_state_controller/JointStateController
    publish_rate: 60

  my_joint_position_controller:
    type: velocity_controllers/JointVelocityController
    joint: my_joint
    pid: {p: 0.5, i: 0.6, d: 0.0035}

I have couple of questions:

  • first, can someone explain the yaml file or give a tutorial explaining this? what is "publish_rate" and what is its role? how can influence the rotation? same for "joint_state_controller"?

  • Second, to change the joint velocity I run :

    rostopic pub /my_joint_position_controller/command std_msgs/Float64 "data: 5.0"

    the data value is a linear velocity (m/s) or rotational velocity (rad/s) ? If it is a linear velocity, how can I transform that to rotational velocity (rad/s)?

  • third, how can I get the joint angle at every moment?

Thanks in advance.

2019-12-12 09:16:04 -0500 answered a question How to control a rotating joint in velocity

1- the yaml file is basically describe the used controllers. It always contains the joint_state_controller which is in c

2019-12-04 07:59:54 -0500 commented question How to control a rotating joint in velocity

Thank you for your reply. When you said state topic, do you mean /joint_states topic or another topic? rostopic list com

2019-12-04 07:59:23 -0500 commented question How to control a rotating joint in velocity

Thank you for your reply. When you said state topic, do you mean /joint_states topic or another topic? rostopic list com

2019-12-04 03:28:59 -0500 commented question How to control a rotating joint in velocity

In my implementation, I followed this tutorial and managed to control the joint. However, when I get to the controller p

2019-12-02 09:54:02 -0500 asked a question How to control a rotating joint in velocity

How to control a rotating joint in velocity Hello everyone, I'm trying to control a rotating joint type "continuous" in

2019-11-28 08:08:29 -0500 answered a question How to control velocity of joints in gazebo using ros_controllers?

Try with : <transmission name="tran6"> <type>transmission_interface/SimpleTransmission</type>

2019-11-28 05:11:54 -0500 received badge  Famous Question (source)
2019-11-07 03:03:54 -0500 received badge  Famous Question (source)
2019-11-05 03:14:31 -0500 received badge  Notable Question (source)
2019-10-23 07:42:53 -0500 commented answer TF_OLD_DATA error when I publish a new topic.

On the contrary, if you look at the error, the TF_OLD_DATA is related to the base_link frame and the /ndt_map is generat

2019-10-18 05:28:02 -0500 edited question TF_OLD_DATA error when I publish a new topic.

TF_OLD_DATA error when I publish a new topic. Hello, I'm trying to create a map of the environment using pcl_ndt. I use

2019-10-18 05:24:07 -0500 edited question TF_OLD_DATA error when I publish a new topic.

TF_OLD_DATA error when I publish a new topic. Hello, I'm trying to create a map of the environment using pcl_ndt. I use

2019-10-18 05:23:47 -0500 commented question TF_OLD_DATA error when I publish a new topic.

Yes, for the broadcasting I use input->header.stamp I updated the question with the callback that I used. See edit ab

2019-10-18 02:56:10 -0500 received badge  Famous Question (source)
2019-10-18 02:56:10 -0500 received badge  Notable Question (source)
2019-10-17 12:25:37 -0500 received badge  Popular Question (source)
2019-10-17 04:51:28 -0500 marked best answer Segmentation fault (core dumped) with PCL 1.9

Hi, I have a problem using PCL 1.9.1 on ubuntu 18.04. The pcl::NormalDistributionTransform works good but a segmentation fault occurs with the pcl::NormalDistributionTransform when I call for the setinputtarget(). Do you have any idea how to handle this error?

2019-10-17 04:27:27 -0500 asked a question TF_OLD_DATA error when I publish a new topic.

TF_OLD_DATA error when I publish a new topic. Hello, I'm trying to create a map of the environment using pcl_ndt. I use

2019-10-15 03:23:39 -0500 received badge  Notable Question (source)
2019-10-10 08:14:29 -0500 received badge  Popular Question (source)
2019-10-10 08:00:27 -0500 answered a question Segmentation fault (core dumped) with PCL 1.9

The solution which worked for me without building all ROS PCL interfacing packages from source is : locate the PCLCo

2019-10-10 08:00:27 -0500 received badge  Rapid Responder (source)
2019-10-09 05:45:24 -0500 commented question Segmentation fault (core dumped) with PCL 1.9

I installed PCL 1.9.1 from package and PCL 1.8.1 it comes when I install ros-melodic. btw compiler gives me some warning

2019-10-09 05:27:34 -0500 asked a question Segmentation fault (core dumped) with PCL 1.9

Segmentation fault (core dumped) with PCL 1.9 Hi, I have a problem using PCL 1.9.1 on ubuntu 18.04. The pcl::NormalDistr

2019-10-07 04:54:12 -0500 commented question Joint position pertubation using effort_controllers/JointPositionController

Hi Borkr, Did you manage to solve the problem? Looks like I have the very same problem.

2019-10-04 05:07:33 -0500 commented answer controller type 'effort_controllers/JointPositionController' does not exist

Thanks for sharing this useful information with us here. It works for me on ros-melodic. I just install : "ros-melodic-e

2019-10-01 09:38:54 -0500 commented question Plugin for rotating velodyne around an axis passing through its center.

Okay, Thanks

2019-10-01 07:22:42 -0500 edited question Plugin for rotating velodyne around an axis passing through its center.

Plugin for rotating velodyne around an axis passing through its center Hi, I'm trying to create a plugin to make velod

2019-09-30 18:31:50 -0500 received badge  Popular Question (source)
2019-09-30 11:06:42 -0500 edited question Plugin for rotating velodyne around an axis passing through its center.

Plugin for rotating velodyne around an axis passing through its center. Hi, I'm trying to create a plugin to make velo

2019-09-30 11:06:42 -0500 received badge  Editor (source)
2019-09-27 10:51:52 -0500 asked a question Plugin for rotating velodyne around an axis passing through its center.

Plugin for rotating velodyne around an axis passing through its center. Hi, I'm trying to create a plugin to make velo

2019-09-27 10:38:51 -0500 asked a question Plugin for rotating velodyne around an axis passing through its center.

Plugin for rotating velodyne around an axis passing through its center. Hi, I'm trying to create a plugin to make velo