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

cduguet's profile - activity

2023-06-22 01:47:29 -0500 received badge  Great Question (source)
2023-06-16 16:36:53 -0500 marked best answer Unable to load plugin for transport 'image_transport/compressed_sub'

I am using Kinect on Ubuntu 16.04.

After executing

rosrun image_view extract_images image_transport/compressed_sub

I get

terminate called after throwing an instance of 'image_transport::TransportLoadException'
what():  Unable to load plugin for transport 'image_transport/compressed_sub', error string:
According to the loaded plugin descriptions the class image_transport/image_transport/compressed_sub_sub with base class type image_transport::SubscriberPlugin does not exist. Declared types are  image_transport/compressedDepth_sub image_transport/compressed_sub image_transport/raw_sub image_transport/theora_sub
Aborted (core dumped)

What surprises me is the name of the class, which seems to me a little redundant. image_transport/image_transport/compressed_sub_sub instead of image_transport/compressed_sub

Is this maybe be a bug?

EDIT: I do have compressed_image_transport installed

2022-12-01 10:33:57 -0500 received badge  Good Question (source)
2021-04-23 15:25:59 -0500 received badge  Good Question (source)
2021-04-16 12:58:41 -0500 received badge  Nice Question (source)
2020-03-06 01:01:20 -0500 received badge  Favorite Question (source)
2018-02-16 06:24:54 -0500 received badge  Enthusiast
2017-10-31 11:23:40 -0500 received badge  Famous Question (source)
2017-10-05 11:08:38 -0500 received badge  Popular Question (source)
2017-10-05 11:08:38 -0500 received badge  Notable Question (source)
2017-09-14 05:56:14 -0500 edited question Unable to load plugin for transport 'image_transport/compressed_sub'

Unable to load plugin for transport 'image_transport/compressed_sub' I am using Kinect on Ubuntu 16.04. After executin

2017-09-14 05:54:28 -0500 asked a question Unable to load plugin for transport 'image_transport/compressed_sub'

Unable to load plugin for transport 'image_transport/compressed_sub' I am using Kinect on Ubuntu 16.04. After executin

2015-11-30 05:53:35 -0500 received badge  Good Question (source)
2015-01-23 05:41:09 -0500 received badge  Nice Question (source)
2014-10-20 10:56:46 -0500 received badge  Nice Question (source)
2014-04-20 12:49:24 -0500 marked best answer rosdep 2 install system dependencies

Hi, it seems like i do not totally understand rosdep2. I could easily add my own system dependencies in rosdep. in the sources.list file I tried to add local yaml file addresses as:

yaml /opt/ros/fuerte/share/ros/opencv.yaml

in order to use my own built opencv-svn (Opencv2.4) package, but it rejects it because:

url must be a fully-specified URL with scheme, hostname, and path

How can I add system dependencies to rosdep2?

2014-04-20 12:43:43 -0500 marked best answer cannot install ros electric source (Checkout problem, after uninstalling)

Hi!

I had a mess because I installed the source and binary electric ros versions. I tried to take everything out and install the source version again, but it does not work. It says there is a problem with the version checkout. What can it be? (I removed everythin ros-el* in apt-get and the source folder ~/ros).

I tried to install the full version. This is what I get:



:~$ rosinstall ~/ros "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no"
rosinstall operating on /home/dlr/ros from specifications in rosinstall files  http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=desktop-full&overlay=no
(Over-)Writing /home/dlr/ros/.rosinstall
[ros] Installing https://code.ros.org/svn/ros/stacks/ros/tags/ros-1.6.8 (None) to /home/dlr/ros/ros
[ros_comm] Installing https://code.ros.org/svn/ros/stacks/ros_comm/tags/ros_comm-1.6.6 (None) to /home/dlr/ros/ros_comm
[common_rosdeps] Installing https://kforge.ros.org/common/rosdepcore (common_rosdeps-1.0.2) to /home/dlr/ros/common_rosdeps
[bond_core] Installing https://kforge.ros.org/common/bondcore (bond_core-1.6.1) to /home/dlr/ros/bond_core
[common_msgs] Installing https://code.ros.org/svn/ros-pkg/stacks/common_msgs/tags/common_msgs-1.6.0 (None) to /home/dlr/ros/common_msgs
[common] Installing https://kforge.ros.org/common/common (common-1.6.1) to /home/dlr/ros/common
[diagnostics] Installing https://code.ros.org/svn/ros-pkg/stacks/diagnostics/tags/diagnostics-1.6.2 (None) to /home/dlr/ros/diagnostics
[driver_common] Installing https://code.ros.org/svn/ros-pkg/stacks/driver_common/tags/driver_common-1.2.4 (None) to /home/dlr/ros/driver_common
[eigen] Installing https://kforge.ros.org/geometry/eigen (eigen-1.6.0) to /home/dlr/ros/eigen
[bullet] Installing https://kforge.ros.org/geometry/bullet (bullet-2.76.5) to /home/dlr/ros/bullet
[geometry] Installing https://kforge.ros.org/geometry/geometry (geometry-1.6.1) to /home/dlr/ros/geometry
[nodelet_core] Installing https://kforge.ros.org/common/nodeletcore (nodelet_core-1.6.2) to /home/dlr/ros/nodelet_core
[orocos_kinematics_dynamics] Installing http://git.mech.kuleuven.be/robotics/orocos_kinematics_dynamics.git (orocos_kinematics_dynamics-0.2.3) to /home/dlr/ros/orocos_kinematics_dynamics
[robot_model] Installing https://kforge.ros.org/robotmodel/robot_model (robot_model-1.6.4) to /home/dlr/ros/robot_model
Initialized empty Git repository in /home/dlr/ros/orocos_kinematics_dynamics/.git/
[pluginlib] Installing https://kforge.ros.org/common/pluginlib (pluginlib-1.6.0) to /home/dlr/ros/pluginlib
[executive_smach] Installing https://kforge.ros.org/smach/executive_smach (executive_smach-1.0.4) to /home/dlr/ros/executive_smach
svn: 'None' does not appear to be a URL
[simulator_gazebo] Installing https://code.ros.org/svn/ros-pkg/stacks/simulator_gazebo/tags/simulator_gazebo-1.4.12 (None) to /home/dlr/ros/simulator_gazebo
[simulator_stage] Installing https://code.ros.org/svn/ros-pkg/stacks/simulator_stage/tags/simulator_stage-1.4.0 (None) to /home/dlr/ros/simulator_stage
svn: 'None' does not appear to be a URL
[stage] Installing https://code.ros.org/svn/ros-pkg/stacks/stage/tags/stage-1.4.1 (None) to /home/dlr/ros/stage
[physics_ode] Installing https://code.ros.org/svn/ros-pkg/stacks/physics_ode/tags/physics_ode-1.6.1 (None) to /home/dlr/ros/physics_ode ...
(more)
2014-04-20 12:43:41 -0500 marked best answer run a subscriber callback once using rospy.spin()

Hi,

I am sorry if I am not using the proper words when I refer to "run a callback function" from a subscriber while using rospy. I'm not sure I got the concept of keeping the nodes sleeping. However, this is not my question.

I want to make a logger node node which takes data from the first message received in a topic, and writes it as a header in a file. Then it will be storing the raw data as long as rospy.spin() says so. The problem is, I have not found an example of how to do this, or if there is such a function. All I can think about are pretty cluttered solutions, which take the time stamp and compares them in every message.

my question is, is there a way to call

rospy.Subscriber("Flow", OpticalFlow2D.msg.FrameFlow, callbackOF)

many times and

rospy.Subscriber("Flow", OpticalFlow2D.msg.FrameFlow, callbackOFonce)

just on the first time, to write the header?

Many thanks,

Cristian

2014-04-20 06:51:47 -0500 marked best answer publish only some topics of a rosbag file (Command line or launch file)

Hi! I am using rosbag play in a launch file, and one of the recorded topics is processed data from the other topics. As I want to produce again, I would like to play all topics except that one.

I know I should have given it an anonymous name or I can play it in a namespace. But I would like just not to have that topic playing.

Thanks!

Cristian

2014-04-20 06:51:47 -0500 marked best answer Convert CvImagePtr* (CvImage) channel to IplImage

Hi,

I have extracted an Image message using cv_bridge as this:

cv_bridge::CvImagePtr cv_ptr;
cv_ptr = cv_bridge::toCvCopy(msg, enc::MONO8);

and i could convert it to an IplImage using:

IplImage *image2 = NULL;
allocateit( &image2, frame_size, IPL_DEPTH_8U, 1 );
image2->imageData = (char *) cv_ptr->image.data;

where allocateit is a function to allocate space. My problem comes when I want to read a color image as this:

cv_bridge::CvImagePtr cv_ptr;
cv_ptr = cv_bridge::toCvCopy(msg, enc::BGR8);
IplImage *image2 = NULL;
allocateit( &image2, frame_size, IPL_DEPTH_8U, 1 );

and want to copy one channel of *cv_ptr to the image to the IplImage *image2. I have tried:

image2->imageData = (char *) cv_ptr->image.data;

but it crashes,

cv::cvtColor(cv_ptr->image.data,image2->imageData,CV_RGB2GRAY);

but does not compile,

int from_to[] = {0,0};
cv::mixChannels(&(cv_ptr->image.data),1,image2,1, from_to,1);

does not compile either.

What would you recommend me to do? Thanks!

2014-04-20 06:51:41 -0500 marked best answer Setting parameters in a launch file does not appear to be working

Hello,

Some script which was working before, now does not work anymore. The issue is that the param instruction in the launch file, does not seem to have any effect in the executable file

<param name="camera_topic" value="/camera/image_rect"  type="str"/>

in my C++ executable, I looked for this "camera_topic" relative parameter as:

ros::param::get("camera_topic",camera_topic);

but I cannot get them easily. setting the same parameter in the program before getting it works, so I conclude it must be something about the launch file. The funny thing is that it worked before (+2 months).

2014-04-20 06:50:55 -0500 marked best answer ld: cannot find -lsensor_msgs (ROS fuerte on ubuntu12.04)

hi,

I have not idea what have happened, but trying to solve another problem (out of the scope of this question, but related to that cvOpticalFlowPyrLK could not be found on cv::) suddenly, when compiling i find this problem :

Linking CXX executable bin/Optical_Flow
/usr/bin/cmake -E cmake_link_script CMakeFiles/Optical_Flow.dir/link.txt --verbose=1
/usr/bin/c++   -O2 -g    -Wl,-rpath,/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/lib -Wl,-rpath,/opt/ros/fuerte/stacks/image_common/image_transport/lib -Wl,-rpath,/opt/ros/fuerte/stacks/pluginlib/lib -Wl,-rpath,/opt/ros/fuerte/stacks/image_common/camera_info_manager/lib -Wl,-rpath,/opt/ros/fuerte/stacks/image_common/camera_calibration_parsers/lib -Wl,-rpath,/opt/ros/fuerte/stacks/geometry/tf/lib -Wl,-rpath,/opt/ros/fuerte/stacks/bullet/lib -pthread CMakeFiles/Optical_Flow.dir/src/Optical_Flow.o  -o bin/Optical_Flow -rdynamic -L/opt/ros/fuerte/lib -L/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/lib -L/opt/ros/fuerte/stacks/image_common/image_transport/lib -L/opt/ros/fuerte/stacks/pluginlib/lib -L/opt/ros/fuerte/stacks/image_common/camera_info_manager/lib -L/opt/ros/fuerte/stacks/image_common/camera_calibration_parsers/lib -L/opt/ros/fuerte/stacks/geometry/tf/lib -L/opt/ros/fuerte/stacks/bullet/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_gpu -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_nonfree -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_ts -lopencv_video -lopencv_videostab -lcv_bridge -lsensor_msgs -limage_transport -lpoco_lite -lboost_fs_wrapper -ltinyxml -lroslib -lmessage_filters -lroscpp -lrostime -lrosconsole -lroscpp_serialization -lxmlrpcpp -lcamera_info_manager -lcamera_calibration_parsers -ltf -lboost_thread-mt -lBulletDynamics -lBulletCollision -lLinearMath -Wl,-rpath,/opt/ros/fuerte/lib:/opt/ros/fuerte/stacks/vision_opencv/cv_bridge/lib:/opt/ros/fuerte/stacks/image_common/image_transport/lib:/opt/ros/fuerte/stacks/pluginlib/lib:/opt/ros/fuerte/stacks/image_common/camera_info_manager/lib:/opt/ros/fuerte/stacks/image_common/camera_calibration_parsers/lib:/opt/ros/fuerte/stacks/geometry/tf/lib:/opt/ros/fuerte/stacks/bullet/lib 
/usr/bin/ld: cannot find -lsensor_msgs
make[2]: Leaving directory `/home/dlr/ros_workspace/OpticalFlow'
collect2: ld returned 1 exit status
make[1]: Leaving directory `/home/dlr/ros_workspace/OpticalFlow'
make[2]: *** [bin/Optical_Flow] Error 1
make[1]: *** [CMakeFiles/Optical_Flow.dir/all] Error 2
make: *** [all] Error 2

I have no idea what could have happened, since it was compiling before with the exact same code. The only thing that comes to my mind it could have bee, is that I reinstalled the repos packages ros-fuerte-* . Still, my previously installed ROS is also the repos one, and I was using it almost out of the box.

In .bashrc I have:

source /opt/ros/fuerte/setup.bash
source /home/dlr/ros_workspace/setup.bash
export ROS_PACKAGE_PATH=~/ros_workspace:/opt/ros/fuerte/stacks:/opt/ros/fuerte/share:/opt/ros/fuerte/share/ros
export ROS_WORKSPACE=~/ros_workspace
export EDITOR='gedit'

in my manifest I have :

  <depend package="sensor_msgs"/>

But in /opt/ros/fuerte/lib:

$ ls *sensor*
ls: cannot access *sensor*: No such file or directory

Can somebody give me hints how to track this problem?? Thank you

2014-04-20 06:50:54 -0500 marked best answer Using arguments in callback function of image_transport::ImageTransport::subscribeCamera or pass a pointer

Hi, I need to use two continuous images in order to calculate the Optical Flow between them. I created the Optical_Flow class, in which the subscriber to the Camera images calls its member function Optical_Flow::flowcallback to calculate the flow between the grabbed image and a previous one (whose pointer is the argument I want to give). So, inside flowcallback we will create cv_ptr and use cv_ptr_prev to make our calculations.

I have read that you can use boost::bind for this purpose, so that way the instantiated function just asks for the rest of the arguments. The implementation of the subscribeCamera is a little bit different, as it takes one more argument, and my implementations looks like this:

class Optical_Flow
{
  ros::NodeHandle node;
  image_transport::ImageTransport transport;
  image_transport::CameraSubscriber image_sub;
  image_transport::Publisher image_pub;

public:
  Optical_Flow()  : transport(node)
  {
      cv_bridge::CvImagePtr cv_ptr_prev;
      image_pub = transport.advertise("out", 1);
      image_sub = transport.subscribeCamera("/camera/image_raw", 1, boost::bind(&Optical_Flow::flowcallback,_1,_2,cv_ptr_prev), this);

  ...
  }

  void flowcallback(const sensor_msgs::ImageConstPtr& msg, const sensor_msgs::CameraInfoConstPtr& info_msg, cv_bridge::CvImagePtr cv_ptr_prev)
  {
     //Create cv_ptr and determine flow from image cv_ptr_prev
  }
};

The problem is, that it gives me the following error messages:

/usr/include/boost/bind/bind.hpp:69:37: error: ‘void (Optical_Flow::*)(const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&, const boost::shared_ptr<const sensor_msgs::CameraInfo_<std::allocator<void> > >&, boost::shared_ptr<cv_bridge::CvImage>)’ is not a class, struct, or union type
...
.../OpticalFlow/src/Optical_Flow.cpp:75:130: error: no matching function for call to ‘image_transport::ImageTransport::subscribeCamera(const char [18], int, boost::_bi::bind_t<boost::_bi::unspecified, void (Optical_Flow::*)(const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&, const boost::shared_ptr<const sensor_msgs::CameraInfo_<std::allocator<void> > >&, boost::shared_ptr<cv_bridge::CvImage>), boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<boost::shared_ptr<cv_bridge::CvImage> > > >, Optical_Flow* const)’

/OpticalFlow/src/Optical_Flow.cpp:75:130: note: candidates are:
/opt/ros/fuerte/stacks/image_common/image_transport/include/image_transport/image_transport.h:103:20: note: image_transport::CameraSubscriber image_transport::ImageTransport::subscribeCamera(const string&, uint32_t, const Callback&, const VoidPtr&, const image_transport::TransportHints&)

/opt/ros/fuerte/stacks/image_common/image_transport/include/image_transport/image_transport.h:103:20: note:   no known conversion for argument 4 from ‘Optical_Flow* const’ to ‘const VoidPtr& {aka const boost::shared_ptr<void>&}’


/opt/ros/fuerte/stacks/image_common/image_transport/include/image_transport/image_transport.h:111:20: note: image_transport::CameraSubscriber image_transport::ImageTransport::subscribeCamera(const string&, uint32_t, void (*)(const ImageConstPtr&, const CameraInfoConstPtr&), const image_transport::TransportHints&)
/opt/ros/fuerte/stacks/image_common/image_transport/include/image_transport/image_transport.h:111:20: note:   no known conversion for argument 3 from ‘boost::_bi::bind_t<boost::_bi::unspecified, void (Optical_Flow::*)(const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&, const boost::shared_ptr<const sensor_msgs::CameraInfo_<std::allocator<void> > >&, boost::shared_ptr<cv_bridge::CvImage>), boost::_bi::list3<boost::arg<1>, boost::arg<2>, boost::_bi::value<boost::shared_ptr<cv_bridge::CvImage> > > >’ to ‘void (*)(const ImageConstPtr&, const CameraInfoConstPtr&) {aka void (*)(const boost::shared_ptr<const sensor_msgs::Image_<std::allocator<void> > >&, const boost::shared_ptr<const sensor_msgs::CameraInfo_<std::allocator<void> > >&)}’
/opt/ros/fuerte/stacks/image_common/image_transport/include/image_transport/image_transport.h:125:20 ...
(more)