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

alexe's profile - activity

2023-03-16 08:35:56 -0500 received badge  Nice Question (source)
2020-10-25 09:34:29 -0500 received badge  Famous Question (source)
2020-07-01 21:40:21 -0500 received badge  Notable Question (source)
2020-05-26 07:13:55 -0500 received badge  Popular Question (source)
2020-04-11 13:13:16 -0500 commented question rviz window closes itself

Happened to me too when I was accidentally publishing messages with illegal values, in my case NaNs in a PoseStamped. On

2020-03-30 05:33:06 -0500 received badge  Enthusiast
2020-03-28 06:50:06 -0500 commented answer Undefined symbol error when using tf2_ros::BufferInterface::transform

That solved it, thank you so much! Follow-up question (since I'm a bit of a noob): Why does this only fail at run time a

2020-03-28 06:49:42 -0500 commented answer Undefined symbol error when using tf2_ros::BufferInterface::transform

That solved it, thank you so much! Follow-up question (since I'm a bit of a noob): Why does this only fail at run time a

2020-03-28 06:44:37 -0500 marked best answer Undefined symbol error when using tf2_ros::BufferInterface::transform

I'm trying to use the tf2_ros::BufferInterface::transform method on a PointCloud2 message like so (tf_buffer_ is a tf2_ros::Buffer object):

void someMethod(const sensor_msgs::PointCloud2ConstPtr& input_cloud)
{
  const auto transformed_cloud = tf_buffer_.transform<sensor_msgs::PointCloud2>(*input_cloud,
      some_frame_id, ros::Duration(0.1));

  ... do some stuff ...
}

The code compiles fine, but fails with a symbol lookup error during run time:

undefined symbol: ros::Time const& tf2::getTimestamp<sensor_msgs::PointCloud2_<std::allocator<void> > >(sensor_msgs::PointCloud2_<std::allocator<void> > const&)

I have no idea what is going on. I tried to include all sorts of packages (tf2, tf2_ros, tf2_msgs, tf2_sensor_msgs, geometry_msgs, sensor_msgs) in both my CMakeLists and my package.xml, but that doesn't help.

It's worthwhile mentioning that I'm using the same tf2_ros::Buffer object before this point in the program to transform a geometry_msgs::PointStamped message, which has the same frame_id as the point cloud, into the same target frame, and there it works just fine. Just for this PointCloud2 message it seems to fail.

2020-03-28 06:44:34 -0500 commented answer Undefined symbol error when using tf2_ros::BufferInterface::transform

That solved it, thank you so much! Follow-up question (since I'm a bit of a noob): Why does this only fail at run time a

2020-03-27 19:31:13 -0500 edited question Undefined symbol error when using tf2_ros::BufferInterface::transform

Undefined symbol error when using tf2_ros::BufferInterface::transform I'm trying to use the tf2_ros::BufferInterface::tr

2020-03-27 19:25:38 -0500 commented answer Convert PointCloud2ConstPtr to PointCloud2

But why would you need to use pcl_ros::transformPointCloud if there are no PCL types involved? That seems to make no sen

2020-03-27 19:25:24 -0500 commented answer Convert PointCloud2ConstPtr to PointCloud2

But why would you need to use pcl_ros::transformPointCloud if there are no PCL types involved? That seems to make no sen

2020-03-27 19:19:11 -0500 asked a question Undefined symbol error when using tf2_ros::BufferInterface::transform

Undefined symbol error when using tf2_ros::BufferInterface::transform I'm trying to use the tf2_ros::BufferInterface::tr

2019-03-31 19:42:03 -0500 received badge  Nice Question (source)
2018-10-11 19:42:56 -0500 marked best answer How to run ROS if your default python version is 3.x via Anaconda

Hey there,

the default python version I use on my Ubuntu 16.04 machine is 3.6 (Anaconda) and I'm trying to setup my catkin workspace. When I run catkin_make, I get an error that has been described in a few other questions here (such as here and here):

ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.

The suggestions in the other questions don't help me, as this is about a more general problem:

How can I run ROS (Kinetic in my case) when my default python version is 3.x?

I want to make it so that ROS uses python 2.7, but I want to keep python 3.6 as my default python version.

Is that possible? If yes, how do I do that?

This is my default python version:

$ python -V
Python 3.6.0 :: Anaconda 4.3.1 (64-bit)

And my sys.path:

$ python -c 'import sys; print(sys.path)'
['', '/opt/ros/kinetic/lib/python2.7/dist-packages', '/home/xyz/anaconda3/lib/python36.zip', '/home/xyz/anaconda3/lib/python3.6', '/home/xyz/anaconda3/lib/python3.6/lib-dynload', '/home/xyz/anaconda3/lib/python3.6/site-packages', '/home/xyz/anaconda3/lib/python3.6/site-packages/Sphinx-1.5.1-py3.6.egg', '/home/xyz/anaconda3/lib/python3.6/site-packages/setuptools-27.2.0-py3.6.egg']

I tried to simply add /usr/lib/python2.7/ to my ~/.bashrc, but that doesn't work. I can't even source the .bashrc because of syntax errors in all files with python 2 syntax.

My logic was that if I simply add all python directories, version 2.x and 3.x, to my PYTHONPATH, then any application (such as ROS) can always find the right modules it needs. But it doesn't seem to work like that, or at least simply adding python paths to .bashrc. doesn't work.

Weirdly, the path '/opt/ros/kinetic/lib/python2.7/dist-packages' is already in there, but it is /usr/lib/python2.7/dist-packages that contains catkin_pkg and some other important packages and modules.

Any help is very much appreciated!

2018-06-21 15:35:34 -0500 received badge  Famous Question (source)
2018-06-01 17:09:52 -0500 commented answer when will Python 3 become the ROS standard

Thanks for that info! The fact that ROS doesn't support Python 3 in 2018 is honestly absolutely ridiculous.

2018-01-02 09:25:27 -0500 received badge  Notable Question (source)
2017-11-19 22:43:05 -0500 received badge  Popular Question (source)
2017-11-19 16:40:59 -0500 commented answer I copied a workspace and now catkin_make doesn't work

Thanks, the build and devel folders were exactly the issue! After deleting them, building worked as expected :)

2017-11-19 16:39:56 -0500 received badge  Supporter (source)
2017-11-19 16:39:54 -0500 marked best answer I copied a workspace and now catkin_make doesn't work

I created a workspace catkin_ws_01 and created some packages inside it.

Then I duplicated that same workspace folder to create catkin_ws_02 and made some changes to the packages inside. Then I deleted the original workspace folder catkin_ws_01.

Now when I try to run catkin_make from inside catkin_ws_02, it gives me the following error message:

CMake Error: The source directory "/home/blabla/catkin_ws_01/src" does not exist.

This means that catkin_make still refers to catkin_ws_01 even though I am executing the command from within catkin_ws_02.

What is going on and how can I fix this?

2017-11-19 16:39:54 -0500 received badge  Scholar (source)
2017-11-19 16:39:08 -0500 commented question I copied a workspace and now catkin_make doesn't work

@ahendrix I'm sorry, when I deleted the question I didn't even realize that there had already been an answer.

2017-11-19 15:35:34 -0500 asked a question I copied a workspace and now catkin_make doesn't work

I copied a workspace and now catkin_make doesn't work I created a workspace catkin_ws_01 and created some packages insid

2017-07-28 03:40:35 -0500 received badge  Student (source)
2017-06-22 06:05:41 -0500 received badge  Famous Question (source)
2017-06-22 06:05:41 -0500 received badge  Popular Question (source)
2017-06-22 06:05:41 -0500 received badge  Notable Question (source)
2017-06-06 12:30:05 -0500 received badge  Famous Question (source)
2017-05-23 08:05:18 -0500 received badge  Popular Question (source)
2017-05-23 08:05:18 -0500 received badge  Notable Question (source)
2017-04-17 17:56:07 -0500 answered a question How to run ROS if your default python version is 3.x via Anaconda

Creating a conda environment with python 2.7 and then PIP installing catking_pkg and running catkin_make from within that environment solves the issue above, but now I'm getting a new error described here.

2017-04-17 17:19:30 -0500 received badge  Editor (source)
2017-04-17 17:07:00 -0500 commented answer catkin cmake error with ros (error code 1)

I'm having the same problem above and this does not solve the problem, not finding catkin_pkg is not the problem here. It is already installed via PIP in my case and I'm still getting this error.

2017-04-17 16:57:11 -0500 edited question catkin_make fails with "Invalid package manifest"

Hey everybody,

I'm trying to create a catkin workspace, but keep getting the error below when running catkin_make. I run ROS Kinetic on Ubuntu 16.04 and I use a virtual pyton 2.7 conda environment using Anaconda. This is the error I keep getting (the full output is below):

 catkin_pkg.package.InvalidPackage: Invalid package manifest "/opt/ros/kinetic/share/catkin/cmake/../package.xml": Error(s) in /opt/ros/kinetic/share/catkin/cmake/../package.xml:
- The manifest must not contain the following tags: depend, build_export_depend, buildtool_export_depend
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/alex/anaconda3/envs/python2/bin/python
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/alex/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
  returned error code 1

I am clueless as to what to do. One other question here suggested PIP-installing catkin_pkg, but that does not solve the problem in my case as catkin_pkg was already installed using PIP, so not finding catkin_pkg is not the issue here. Any help much appreciated!

A bit more information:

Installed ROS Kinetic using sudo apt-get install ros-kinetic-desktop-full

Tried creating the workspace exactly following the tutorial here but obviously didn't get past the catkin_make part

Content of /opt/ros/kinetic/share/catkin/cmake/../package.xml:

<?xml version="1.0"?>
<package format="2">
  <name>catkin</name>
  <version>0.7.6</version>
  <description>Low-level build system macros and infrastructure for ROS.</description>
  <maintainer email="dthomas@osrfoundation.org">Dirk Thomas</maintainer>
  <license>BSD</license>

  <url type="website">http://www.ros.org/wiki/catkin</url>
  <url type="bugtracker">https://github.com/ros/catkin/issues</url>
  <url type="repository">https://github.com/ros/catkin</url>

  <author>Troy Straszheim</author>
  <author>Morten Kjaergaard</author>
  <author>Brian Gerkey</author>
  <author>Dirk Thomas</author>

  <buildtool_depend>cmake</buildtool_depend>
  <buildtool_export_depend>cmake</buildtool_export_depend>

  <depend>python-argparse</depend>
  <depend version_gt="0.2.9">python-catkin-pkg</depend>

  <build_depend>python-empy</build_depend>

  <build_export_depend>gtest</build_export_depend>
  <build_export_depend>python-empy</build_export_depend>
  <build_export_depend>python-nose</build_export_depend>

  <test_depend>python-mock</test_depend>
  <test_depend>python-nose</test_depend>

  <export>
    <rosdoc config="rosdoc.yaml"/>
    <architecture_independent/>
  </export>
</package>

Why does package.xml contain the three tags that it is not supposed to contain, depend, build_export_depend, and buildtool_export_depend, and what can I do about that?

And here is the full output after running catkin_pkg:

$ catkin_make
Base path: /home/alex/catkin_ws
Source space: /home/alex/catkin_ws/src
Build space: /home/alex/catkin_ws/build
Devel space: /home/alex/catkin_ws/devel
Install space: /home/alex/catkin_ws/install
Creating symlink "/home/alex/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/kinetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/alex/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/alex/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/alex/catkin_ws/install -G Unix Makefiles" in "/home/alex/catkin_ws/build"
####
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting ...
(more)