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

meeple's profile - activity

2016-04-22 09:50:08 -0500 received badge  Famous Question (source)
2016-03-27 12:53:33 -0500 received badge  Notable Question (source)
2016-03-26 10:14:30 -0500 received badge  Popular Question (source)
2016-03-25 22:23:28 -0500 asked a question Creating tf from map to base_link

I am using gmapping and robot_pose_ekf. gmapping provides tf from map to odom_combined, and robot_pose_ekf provides odom_combined to base_link. I want to see in rviz the location of the robot which is map to base_link. I therefore wrote a tf publisher to broadcast this transform.

#include <ros ros.h="">
#include <tf transform_listener.h="">
#include <tf transform_broadcaster.h="">

int main(int argc, char** argv){ ros::init(argc, argv, "tf_linker"); ros::NodeHandle node; tf::TransformListener listener; static tf::TransformBroadcaster br; ros::Rate rate(20.0); while (node.ok()){ tf::StampedTransform t_bo; tf::StampedTransform t_om; try{ listener.lookupTransform("base_link","odom_combined",ros::Time(0),t_bo); listener.lookupTransform("odom_combined","map",ros::Time::Time(0),t_om); } catch(tf::TransformException &ex){ ROS_ERROR("%s", ex.what()); ros::Duration(1.0).sleep(); continue; } tf::Transform transform; transform.setOrigin(t_bo.getOrigin()+t_om.getOrigin()); transform.setRotation(t_om.getRotation()+t_bo.getRotation()); br.sendTransform(tf::StampedTransform(transform,ros::Time::now(),"map","base_link")); } }

The problem is that the tf times seems to not be synced by fraction of a second.

Here is the error message:

    [ERROR] [1458961860.893869464]: Lookup would require extrapolation into the future.  Requested time 1458961860.893782533 but the latest data is at time 1458961860.893781547, when looking up transform from frame [map] to frame [odom_combined]
Warning: TF_OLD_DATA ignoring data from the past for frame base_link at time 1.45896e+09 according to authority unknown_publisher
Does tf require exactly the same time? That seems very unreasonable. How do I fix it? thanks

2016-03-11 22:28:18 -0500 received badge  Famous Question (source)
2016-03-11 22:27:56 -0500 received badge  Enthusiast
2016-03-07 21:43:52 -0500 received badge  Notable Question (source)
2016-03-07 20:33:31 -0500 received badge  Editor (source)
2016-03-07 19:19:31 -0500 received badge  Popular Question (source)
2016-03-07 13:18:59 -0500 commented question compressed_image_transport segmentation fault

gdb says it comes from opencv "cv::imdecode(....) " Is it somehow not recognizing the decompressed image?

2016-03-07 01:02:41 -0500 commented question compressed_image_transport gives segmentation fault

Can you give a link to the other question or answer it? Thank you

2016-03-06 23:52:16 -0500 asked a question compressed_image_transport gives segmentation fault

On Ubuntu, I used a simple image subscriber with Opencv imshow. It works fine with raw image, but once I change the param to compressed, it immediately gives segmentation fault. Does it have something to do with cvbridge:toCvShare doesn't decode the compressed image correctly? How to fix it? Thank you.

2016-03-06 23:52:16 -0500 asked a question compressed_image_transport segmentation fault

On Ubuntu, I wrote a simple subscriber and display with cv::imshow. It works with raw image, but if I set the image_transport param to "compressed" it immediately gives segmentation fault. I am guessing that it has something to do with cvbridge::toCvShare not decoding the compressed image correctly or somehow not compatible with opencv. Is there a fix? Thank you.

gbd response: Program received signal SIGSEGV, Segmentation fault. 0x00007ffff79a036c in cv::imdecode(cv::_InputArray const&, int) () from /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4 (gdb)

#0  0x00007ffff79a036c in cv::imdecode(cv::_InputArray const&, int) ()
   from /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.2.4
#1  0x00007fffd15174d7 in ?? ()
   from /opt/ros/indigo/lib//libcompressed_image_transport.so
#2  0x00007fffd151914c in ?? ()
   from /opt/ros/indigo/lib//libcompressed_image_transport.so
#3  0x00007fffd151c1d0 in ?? ()
   from /opt/ros/indigo/lib//libcompressed_image_transport.so
#4  0x00007ffff74bf9c5 in ros::SubscriptionQueue::call() ()
   from /opt/ros/indigo/lib/libroscpp.so
#5  0x00007ffff747d777 in ros::CallbackQueue::callOneCB(ros::CallbackQueue::TLS) () from /opt/ros/indigo/lib/libroscpp.so
#6  0x00007ffff747e583 in ros::CallbackQueue::callAvailable(ros::WallDuration)
    () from /opt/ros/indigo/lib/libroscpp.so
#7  0x00007ffff74c24e5 in ros::SingleThreadedSpinner::spin(ros::CallbackQueue)
    () from /opt/ros/indigo/lib/libroscpp.so
#8  0x00007ffff74aaaeb in ros::spin() () from /opt/ros/indigo/lib/libroscpp.so
#9  0x0000000000407369 in main (argc=1, argv=0x7fffffffd9d8)
    at /home/ethan/camera/src/camera_reader/src/reader.cpp:27

source code is http://wiki.ros.org/image_transport/T... unmodified.