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

timster's profile - activity

2022-12-14 11:53:54 -0500 received badge  Nice Answer (source)
2020-04-19 15:14:12 -0500 received badge  Enlightened (source)
2020-04-19 15:14:12 -0500 received badge  Good Answer (source)
2018-09-05 12:49:02 -0500 received badge  Good Answer (source)
2016-06-16 21:45:59 -0500 received badge  Famous Question (source)
2016-05-30 17:04:17 -0500 received badge  Nice Answer (source)
2016-04-05 06:16:13 -0500 received badge  Nice Answer (source)
2016-03-31 13:50:57 -0500 received badge  Nice Answer (source)
2015-06-23 04:40:18 -0500 received badge  Notable Question (source)
2015-06-15 10:15:52 -0500 commented question Unable to download laser.bag

right click, save as

2015-06-15 10:05:55 -0500 commented question How do you use inverseTimes()?

I've noticed that some tf functions from c++ are not available in python... I can't think of a workaround that is quicker than implementing this function yourself :-(

2015-06-05 07:13:02 -0500 commented question How to read the names of recorded topics in a rosbag?

Duplicate: #q39345.

2015-06-01 07:13:06 -0500 received badge  Popular Question (source)
2015-06-01 07:12:19 -0500 answered a question Embedding python in C++

Looks like a linker error... Have you added the somehing like the following to your CMakeLists.txt?

find_package (PythonLibs 3.4 EXACT)

target_link_libraries(fault_detector ${catkin_LIBRARIES} ${PYTHON_LIBRARIES})
2015-05-28 11:07:53 -0500 commented question Unable to link some PCL filters (specifically PlaneClipper3D)

Updated...

2015-05-28 05:02:03 -0500 asked a question Unable to link some PCL filters (specifically PlaneClipper3D)

Dear ROS community,

I am tearing my hair out at this!

I would like to use PCL's PlaneClipper3D in my project. At first sight it looks like a common linker error:

/home/[username]/catkin_ws/devel/lib/libmy_package.so: undefined reference to `pcl::PlaneClipper3D<pcl::PointXYZ>::~PlaneClipper3D()'
/home/[username]/catkin_ws/devel/lib/libmy_package.so: undefined reference to `pcl::PlaneClipper3D<pcl::PointXYZ>::PlaneClipper3D(Eigen::Matrix<float, 4, 1, 0, 4, 1> const&)'

I spent half a day now to figure out the correct setup of my CMakeLists.txt and package.xml - but no luck.

Now I did a simple sanity check and used Clipper3D instead of PlaneClipper3D. Now unexpectedly this works!

Can anyone explain why one filter can be used in ROS and the other one can not?

For completeness: here is my CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8.3)
project(my_package)

find_package(catkin REQUIRED COMPONENTS
  pcl_conversions
  pcl_ros
  roscpp
  sensor_msgs
)

find_package(PCL REQUIRED)
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})

catkin_package(
  INCLUDE_DIRS include
  LIBRARIES my_package
  CATKIN_DEPENDS pcl_conversions pcl_ros roscpp sensor_msgs
  DEPENDS PCL
)

set(CMAKE_BUILD_TYPE Release)
add_definitions(-std=c++11 -O3)

include_directories(
  include
  ${catkin_INCLUDE_DIRS}
  ${PCL_INCLUDE_DIRS}
)

add_library(my_package
  src/src1.cc
  src/src2.cc
)
target_link_libraries(my_package ${catkin_LIBRARIES} ${PCL_LIBRARIES})

add_executable(main
  src/main.cc
)
target_link_libraries(main my_package)

and my package.xml:

<?xml version="1.0"?>
<package>
  <name>my_package</name>
  <version>0.0.0</version>
  <description>The my_package package</description>

  <maintainer email="otim@todo.todo">otim</maintainer>
  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>

  <!--build_depend>libpcl-all-dev</build_depend--><!-- tried with and without -->
  <build_depend>pcl_conversions</build_depend>
  <build_depend>pcl_ros</build_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>sensor_msgs</build_depend>

  <!--run_depend>libpcl-all</run_depend-->
  <run_depend>pcl_conversions</run_depend>
  <run_depend>pcl_ros</run_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>sensor_msgs</run_depend>

</package>

Update: I am using standard ROS indigo on Ubuntu 14.04 64bit. PCL was installed along with the ROS installation precedure not from source. PCL version is 1.7 as far as I know.

2015-05-19 08:38:19 -0500 commented answer publish only current cloud as octomap

Yes before or after receiving a new message

2015-05-19 08:30:46 -0500 answered a question publish only current cloud as octomap

For the local octomap you could try to use the reset service ( http://wiki.ros.org/octomap_server#Se... ) before inserting a new point cloud. This way you would have the desired behavior without any modifications to the code. Not sure if this runs fast enough though...

Cheers

Tim

2015-05-04 19:06:46 -0500 received badge  Necromancer (source)
2015-05-04 09:00:34 -0500 answered a question undefined reference to symbol 'cv::cvtColor(cv::_InputArray const&, cv::_OutputArray const&, int, int)'

It seems to me that you don't link to OpenCV. Do this by adding the following line to your CMakeLists.txt

find_package(OpenCV REQUIRED)

And you might also need to link your executable/library to it

target_link_libraries(your_target ${OpenCV_LIBS})

In your case change

 target_link_libraries(color_to_gray_node ${catkin_LIBRARIES})

for

 target_link_libraries(color_to_gray_node ${catkin_LIBRARIES} ${OpenCV_LIBS} )
2015-05-04 08:51:06 -0500 answered a question PTAM Configuration Files

It is located in ethzasl_ptam/ptam/

2015-04-29 10:16:29 -0500 commented answer PTAM Error

Please post as a separate question

2015-04-28 09:32:06 -0500 answered a question PTAM Error

You need to source your workspace using the following command.

 source ~/your_catkin_workspace/devel/setup.bash

By that a new package is added to your path and thus known to the ROS environment.

2014-10-22 12:57:00 -0500 received badge  Enthusiast
2014-09-03 17:47:44 -0500 commented question Remapping a topic inside a controller?

Please post your launch file

2014-07-21 16:35:33 -0500 received badge  Nice Answer (source)
2014-01-28 17:31:09 -0500 marked best answer How to rectify downsampled stereo images using binning?

Hi there!

This is my first post! (So far I found all the answers I needed, which is awesome!)

I am writing my own node for rectifying stereo images. The reason I do this is to be able to rectify/undistort only every n-th frame and also to downsample the images right at the beginning, both to reduce computational cost.

So far, I manage to rectify images at the full resolution and then downsample them. I suspect that first downsampling and then rectifying them would be faster, which I was trying to get to work. Looking through the code of PinholeCameraModel ros.org/doc/api/image_geometry/html/c++/pinhole__camera__model_8cpp_source.html, it seemed to me that when I would set the binning_x and binning_y fields in the camera_info to let's say 2, the PinholeCameraModel would compute the rectification map for downsampled images. Unfortunately, this gave weirdly warped images. What am I missing? What else needs to be set?

Thanks in advance!

Here is my callback function:

void process(const sensor_msgs::ImageConstPtr& l_image_msg, const sensor_msgs::ImageConstPtr& r_image_msg, const sensor_msgs::CameraInfoConstPtr& l_info_msg, const sensor_msgs::CameraInfoConstPtr& r_info_msg){
if (count_ == 0) // The count_ stuff is there not to process every frame but to skip some in between
{
  // Prepare images
  int32_t l_step, r_step;
  cv_bridge::CvImageConstPtr l_cv_ptr, r_cv_ptr;
  l_cv_ptr = cv_bridge::toCvShare(l_image_msg, sensor_msgs::image_encodings::MONO8);
  l_step = l_cv_ptr->image.step[0];
  r_cv_ptr = cv_bridge::toCvShare(r_image_msg, sensor_msgs::image_encodings::MONO8);
  r_step = r_cv_ptr->image.step[0];

  ROS_ASSERT(l_step == r_step);
  ROS_ASSERT(l_image_msg->width == r_image_msg->width);
  ROS_ASSERT(l_image_msg->height == r_image_msg->height);

  cv_bridge::CvImagePtr l_image_rect(new cv_bridge::CvImage(l_cv_ptr->header, l_cv_ptr->encoding));
  cv_bridge::CvImagePtr r_image_rect(new cv_bridge::CvImage(r_cv_ptr->header, r_cv_ptr->encoding));

  // Downsample if desired
  if (config_.downsample)
  {
    // Copy cam info to be able to modify
    sensor_msgs::CameraInfo l_info_msg_new(*l_info_msg);
    sensor_msgs::CameraInfo r_info_msg_new(*r_info_msg);

    // Modify cam info
    l_info_msg_new.binning_x = 2;
    l_info_msg_new.binning_y = 2;
    r_info_msg_new.binning_x = 2;
    r_info_msg_new.binning_y = 2;

    // Update camera models
    l_model_.fromCameraInfo(l_info_msg_new);
    r_model_.fromCameraInfo(r_info_msg_new);

    // Downsample
    cv_bridge::CvImagePtr l_image_ds(new cv_bridge::CvImage(l_cv_ptr->header, l_cv_ptr->encoding));
    cv_bridge::CvImagePtr r_image_ds(new cv_bridge::CvImage(r_cv_ptr->header, r_cv_ptr->encoding));
    cv::resize(l_cv_ptr->image, l_image_ds->image, cv::Size(0, 0), 0.5, 0.5, CV_INTER_LINEAR);
    cv::resize(r_cv_ptr->image, r_image_ds->image, cv::Size(0, 0), 0.5, 0.5, CV_INTER_LINEAR);

    // Rectify
    l_model_.rectifyImage(l_image_ds->image, l_image_rect->image, CV_INTER_LINEAR); 
    r_model_.rectifyImage(r_image_ds->image, r_image_rect->image, CV_INTER_LINEAR); 
  }
  else
  {
    // Update camera models
    l_model_.fromCameraInfo(l_info_msg);
    r_model_.fromCameraInfo(r_info_msg);

    // Rectify
    l_model_.rectifyImage(l_cv_ptr->image, l_image_rect->image, CV_INTER_LINEAR); 
    r_model_.rectifyImage(r_cv_ptr->image, r_image_rect->image, CV_INTER_LINEAR); 
  }

  // Publish
  left_pub_->publish(l_image_rect->toImageMsg());
  right_pub_->publish(r_image_rect->toImageMsg());

  ++count_;
}
else if (count_ >= config_.frames_to_skip) // >= because config_.frames_to_skip can change
  count_ = 0;
else
  ++count_;}

Best Tim

2014-01-15 21:15:49 -0500 commented answer transform listener in qt ros package

Update your question, please. What written in your manifest.xml, your CMakeLists.txt, your Makefile? What is the exact line you are using to include transform_listener.h?

2014-01-15 21:15:49 -0500 received badge  Commentator
2014-01-12 07:42:46 -0500 received badge  Famous Question (source)
2014-01-01 20:15:05 -0500 commented answer How to write to a file different parameters from different CallBacks with same timestamp?

message_filters allow you to use one callback for multiple messages of any type, so it should not matter if the messages come from different sensors... Or did I miss something? Why do you think you have to use three callbacks?

2013-12-18 21:44:50 -0500 answered a question How to write to a file different parameters from different CallBacks with same timestamp?

You could try implementing one callback for all three messages using message_filters. You can either use an exact time policy if all topics are exactly in sync or an approximate time policy to allow small differences between their timestamps. An example and a more detailed description is given here:

http://wiki.ros.org/message_filters#Policy-Based_Synchronizer_.5BROS_1.1.2B-.5D

In the callback you could finally write the information you need from your three messages into one txt file.

Best

Tim

2013-12-18 21:20:32 -0500 commented answer How could I launch "octomap_server>octomap_mapping.launch" with "openni_launch>openni.launch"?

if my answer solved your question, please accept it as an answer (;

2013-12-18 21:18:14 -0500 commented answer transform listener in qt ros package

why the sad smiley? rosbuild is much easier to use! so have you added <depend package="tf"/> to your manifest.xml? did it help?

2013-12-16 20:43:53 -0500 answered a question transform listener in qt ros package
#include <tf/transform_listener.h>

Should do the trick (-;

Also make sure you have added it to your manifest.xml if you are using rosbuild (i.e. the rosmake-command) or to your package.xml and CMakeLists.txt if you are using catkin!

Best

Tim

2013-12-10 21:07:09 -0500 received badge  Scholar (source)
2013-12-09 21:51:55 -0500 received badge  Notable Question (source)
2013-12-04 16:52:27 -0500 received badge  Popular Question (source)
2013-12-02 08:52:34 -0500 received badge  Famous Question (source)
2013-11-29 04:17:56 -0500 received badge  Critic (source)
2013-11-28 03:30:37 -0500 received badge  Organizer (source)
2013-11-27 22:37:55 -0500 asked a question Rosbag not playing back on Odroid board!

Hello everybody!

I was planning to test some of my packages on the ARM-based Odroid-XU (ROS hydro on Linaro 13.05), but experienced some strange behavior when trying to play back a bag file.

When I execute the command rosbag play mybag.bag, I get the following output:

[ INFO] [1385631615.554476003]: Opening mybag.bag

Waiting 0.2 seconds after advertising topics... done.

Hit space to toggle paused, or 's' to step.

The problem is that it never got to the stage that it would say:

[RUNNING]  Bag Time: 1381311745.123451   Duration: {time} / 78.856356

But as soon as I quit with ctrl+c, it will display:

[RUNNING]  Bag Time: 1381311666.267094   Duration: 0.000000 / 78.856356     
^C

I tried fiddling around with the different options and had a minor success with -i (play back all messages without waiting). With this option the bag is plays back in a couple of seconds. I think it is interesting that this works, however it does not help in my case.

I have also tried different bags, all of them have been extensively used on my workstation.

Has anyone else experienced this problem? Any clue about how to fix this?

Best

Tim