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

Jep's profile - activity

2022-05-19 03:20:15 -0500 received badge  Famous Question (source)
2022-01-14 10:55:36 -0500 received badge  Notable Question (source)
2022-01-14 10:55:36 -0500 received badge  Popular Question (source)
2021-08-26 08:04:26 -0500 asked a question Image transport very slow when using png compression

Image transport very slow when using png compression I'm developing a ROS driver for a camera which is using image trans

2021-08-26 08:04:25 -0500 asked a question Image transport very slow for png compression

Image transport very slow for png compression I'm developing a ROS driver for a camera which is using image transport fo

2020-05-07 14:17:53 -0500 received badge  Nice Question (source)
2018-09-14 09:55:47 -0500 received badge  Taxonomist
2016-11-11 05:03:48 -0500 received badge  Necromancer (source)
2015-10-13 12:40:50 -0500 received badge  Good Question (source)
2015-06-22 00:35:15 -0500 marked best answer rxbag export crashes.

Hi,

I'm trying to export data from a bagfile using rxbag. After plotting without problems the data I'm interested on I do right click-> export to csv and after naming the file everything crashes with just a seg fault:

1- Does anybody know why does this happen and how to solve this?

2- Has somebody any C++ code or python using the rosbag API to extract data from a bagfile and save it to a csv to use it as a template?

Any help will be appreciated! :)

I'm on Ubunutu 11.10 and rxbag crashes both in Ros electric and fuerte :S

2015-06-22 00:32:27 -0500 received badge  Famous Question (source)
2014-05-12 20:35:58 -0500 received badge  Nice Question (source)
2014-02-18 23:17:46 -0500 received badge  Enthusiast
2014-02-17 03:41:06 -0500 answered a question How to use newer versions of opencv in Fuerte

I had the same problem. The thing is ros sets CPATH variable to something like:

/home/jep/catkin_ws/devel/include:/opt/ros/groovy/include

Then when compiling gcc always finds ROS opencv headers instead of the new ones... So I ended up just deleting CPATH whenever I need to compile somthing with the new OpenCV version.

2014-02-17 03:36:15 -0500 commented answer Standalone OpenCV

Yep... It's very strange for me. I don't understand it always find opencv2 headers even if setting /usr/local/include to CPATH as well... I've tried unsetting CPATH from CMakeLists but it didn't work... Seems that setting them in CMakeLists it's only somehow temporal... Thanks!

2014-02-14 03:50:06 -0500 commented answer Standalone OpenCV

thanks! II've edited the answer

2014-02-13 00:41:13 -0500 received badge  Famous Question (source)
2014-02-12 21:14:24 -0500 commented answer Standalone OpenCV

Thanks to both for your help. I've tried the bchr first approach, and it looks like it finds properly the new OpenCV installation. But, there's something more here. Without ROS opencv it compiles without problem:

-- OpenCV Root directory is /usr/local/share/OpenCV
-- OpenCV include directories are /usr/local/include/opencv
-- OpenCV libs directory is: /usr/local/lib/libopencv_core.so.3.0.0;/usr/local/lib/libopencv_imgproc.so.3.0.0;/usr/local/lib/libopencv_highgui.so.3.0.0;/usr/local/lib/libopencv_ml.so.3.0.0;/usr/local/lib/libopencv_video.so.3.0.0;/usr/local/lib/libopencv_features2d.so.3.0.0;/usr/local/lib/libopencv_calib3d.so.3.0.0;/usr/local/lib/libopencv_objdetect.so.3.0.0;/usr/local/lib/libopencv_contrib.so.3.0.0;/usr/local/lib/libopencv_legacy.so.3.0.0;/usr/local/lib/libopencv_flann.so.3.0.0

When ROS opencv is installed, it fails to compile:

foo.cpp:(.text+0x661): undefined reference to `cv::_OutputArray::_OutputArray(cv::Mat&)'

But the includes and libraries variables are the same!!

-- OpenCV Root directory is /usr/local/share/OpenCV
-- OpenCV include directories are /usr/local/include/opencv
-- OpenCV libs directory is /usr/local/lib/libopencv_core.so.3.0.0;/usr/local/lib/libopencv_imgproc.so.3.0.0;/usr/local/lib/libopencv_highgui.so.3.0.0;/usr/local/lib/libopencv_ml.so.3.0.0;/usr/local/lib/libopencv_video.so.3.0.0;/usr/local/lib/libopencv_features2d.so.3.0.0;/usr/local/lib/libopencv_calib3d.so.3.0.0;/usr/local/lib/libopencv_objdetect.so.3.0.0;/usr/local/lib/libopencv_contrib.so.3.0.0;/usr/local/lib/libopencv_legacy.so.3.0.0;/usr/local/lib/libopencv_flann.so.3.0.0

EDITED:

Ok! Ive done some good progress. The problem is that ROS sets the CPATH environment variable as:

echo $CPATH 
/usr/local/include:/home/jep/catkin_ws/devel/include:/opt/ros/groovy/include

So, even if you include the correct headers gcc wil always find the old ones if you don't delete the CPATH variable... I've tried adding /usr/local/include to CPATH, but the same behaviour appears, it only seems to work unsetting CPATH... Any ideas? I would like to keep CPATH as it is to avoid breaking anythin when I need to use ROS!

2014-02-12 14:43:01 -0500 received badge  Notable Question (source)
2014-02-12 09:22:44 -0500 received badge  Popular Question (source)
2014-02-12 05:36:02 -0500 asked a question Standalone OpenCV

This is an old question, but I couldn't find any good solution.

I have recently installed the latest (unrealesed) OpenCV 3.0 in my machine for some programs. Nothing related with ROS at all. This OpenCV version is installed at /usr/local as usual.

The thing is that, when trying to compile my code, cmake always find the ROS groovy OpenCV version (2.X) and fails. The only way I can compile it is uninstalling ROS OpenCV version or renaming it.

I have tried instead of:

find_package( OpenCV REQUIRED )
target_link_libraries( foo ${OpenCV_LIBS} )

Using:

include_directories(/usr/local/include usr/local/include/opencv2 usr/local/include/opencv)
link_directories(/usr/local/lib)
target_link_libraries( foo opencv_core opencv_highgui opencv_imgproc)

But, no result. Any ideas?

2014-02-12 05:35:17 -0500 asked a question Standalone OpenCV

This is an old question, but I couldn't find any good solution.

I have recently installed the latest (unrealesed) OpenCV 3.0 in my machine for some programs. Nothing related with ROS at all. This OpenCV version is installed at /usr/local as usual.

The thing is that, when trying to compile my code, cmake always find the ROS groovy OpenCV version (2.X) and fails. The only way I can compile it is uninstalling ROS OpenCV version or renaming it.

I have tried instead of:

find_package( OpenCV REQUIRED )
target_link_libraries( foo ${OpenCV_LIBS} )

Using:

include_directories(/usr/local/include usr/local/include/opencv2 usr/local/include/opencv)
link_directories(/usr/local/lib)
target_link_libraries( foo opencv_core opencv_highgui opencv_imgproc)

But, no result.

2014-01-28 17:28:16 -0500 marked best answer rosbag API c++

Hi all,

I'm writing a piece of code that is reading a bagfile, creating a new one, copying all the messages I'm interested from the old one to the new one, and adding a couple of topics more.

Until here everything is fine, but I would be able to copy all the messages from the old bagfile, without having to know the name of the topics and the type of message, but I can't find the way to do this with the C++ API...

I copy a piece of code just to illustrate the way my code works:

rosbag::Bag bag_read;
rosbag::Bag bag_write;
bag_read.open(old_bag, rosbag::bagmode::Read);
bag_write.open(new_bag, rosbag::bagmode::Write);

// First we copy all the topic we need to the new bagfile.

rosbag::View view_all(bag_read);    

BOOST_FOREACH(rosbag::MessageInstance const m, view_all){
    if (m.getTopic() == "/nav/odometry"){
            nav_msgs::Odometry::ConstPtr odom_msg = m.instantiate<nav_msgs::Odometry>();
            if (odom_msg != NULL){              
                ros::Time   time= m.getTime();
                bag_write.write("/nav/odometry", time, odom_msg);
            }
     }
    else if .... /* For every topic I'm interested on */

Thank you!!

SOLVED:

As Lorenz says there is no need to instantiate the message:

BOOST_FOREACH(rosbag::MessageInstance const m, view_all)
     bag_write.write(m.getTopic(),m.getTime(),m);
2014-01-28 17:28:05 -0500 marked best answer Roslaunch error: Bad argument __name:=

Hi there,

I have a ros node that runs without problem when it's called by rosrun, but dies without reason when called by a roslaunch:

NODES
  /
    CalibrateInt (tracking/calibrateInt)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[CalibrateInt-1]: started with pid [27132]
ERROR: 
  Bad argument __name:=CalibrateInt

[CalibrateInt-1] process has died [pid 27132, exit code 255, cmd /home/guillem/ros_workspace/Armed-turtlebot/tracking/bin/calibrateInt __name:=CalibrateInt __log:=/home/guillem/.ros/log/7c0acfb0-2f0e-11e2-948f-446d5719810b/CalibrateInt-1.log].
log file: /home/guillem/.ros/log/7c0acfb0-2f0e-11e2-948f-446d5719810b/CalibrateInt-1*.log
all processes on machine have died, roslaunch will exit
shutting down processing monitor...
... shutting down processing monitor complete
done

launchfile:

<launch>
     <node pkg="tracking" type="calibrateInt" name="CalibrateInt"/>
</launch>
2014-01-28 17:27:38 -0500 marked best answer Rosbag API C++ Reading and writing bag

Hi all,

I've been trying for a while to write a script that reads a bag file and modifies it at the same time, but seems it's impossible with the C++ API. Does anyone know how to do this, or if there is the possibility to create a new bag file? The only way I can do what I want is having two copies of the bag. One for reading and the other one for writing on it...There must be a smarter way!

Thanks!

Josep

2014-01-28 17:27:23 -0500 marked best answer ROS Network through firewall

Hi there,

I have to say I'm a newbie working with networks. I have the following problem:

  • I have a remote machine where my roscore and some other nodes are running.

  • I need to run the nodes in my laptop with that machine as ROS master but there is a firewall between them.

  • I can connect to a server (in the same network as the remote machine) and from that server to the remote machine. So I can skip the firewall...

So, how can I stablish the connection between the two machines?

Somebody told me that I can use ssh -L to make a tunnel for a specific port, but not for all... And this ROS tutorial http://www.ros.org/wiki/ROS/NetworkSetup is talking about OpenVPN that I don't have idea how to use it...

Thanks in advance,

Josep

2014-01-28 17:25:49 -0500 marked best answer Tinyxml: Problem updating code from diamonback to electric.

Hi all,

I have a node that is using tinyxml to read and xml file.

That node works perfectly in diamonback, but I need to update it to electric, so I follow the instrucionts in http://www.ros.org/wiki/tinyxml :

1- Remove tinyxml dependency in manifest.

2- Change the header file which is included... Now is just:

#include <tinyxml.h>

3- Link against the library in the CMakeLists...

target_link_libraries(master tinyxml)

It compiles without problems, but when running the node, the behaviour is not the expected and gives some errors.

It seems like the function Value() is not behaving the same way it was in diamondback...

Do you think I should do any change more than what I have already done? Or maybe the library that was using diamondback and the one which installs electric are slightly different?

I will appreciate any help!

2014-01-26 23:53:34 -0500 received badge  Famous Question (source)
2013-09-30 13:21:10 -0500 received badge  Notable Question (source)
2013-08-27 11:37:12 -0500 received badge  Popular Question (source)