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

Rodrigo Lourenço's profile - activity

2020-06-27 11:18:28 -0500 received badge  Famous Question (source)
2019-01-11 12:38:05 -0500 marked best answer having problems connecting a bag file with a subscriber - Indigo

I have to types of msgs and I am having problems making a connection.

The bag file as this info.


# from odometry
RaposaWheels track
float32 arm_angle

# from pan&tilt
float32 pan
float32 tilt

# from pan&tilt
float32 body_tilt
float32 body_roll

# from imu
geometry_msgs/Quaternion orientation

# from relay board
int16 electronics_battery_mV
int16 motors_battery_mV

# from wireless
int16 wlan_link
int16 wlan_level
int16 wlan_noise

================================================================================
MSG: std_msgs/Header
# Standard metadata for higher-level stamped data types.
# This is generally used to communicate timestamped data 
# in a particular coordinate frame.
# 
# sequence ID: consecutively increasing ID 
uint32 seq
#Two-integer timestamp that is expressed as:
# * stamp.secs: seconds (stamp_secs) since epoch
# * stamp.nsecs: nanoseconds since stamp_secs
# time-handling sugar is provided by the client library
time stamp
#Frame this data is associated with
# 0: no frame
# 1: global frame
string frame_id

================================================================================
MSG: raposang_msgs/RaposaWheels
float32 left
float32 right

================================================================================
MSG: geometry_msgs/Quaternion
# This represents an orientation in free space in quaternion form.

float64 x
float64 y
float64 z
float64 w

Since I had no info I had to built my msg. this is the main msg. Name of the file main_msg.msg


Header header
tracks track #change????
float32 arm_angle
float32 pan
float32 tilt
float32 body_tilt
float32 body_roll
geometry_msgs/Quaternion orientation 
int16 electronics_battery_mV
int16 motors_battery_mV
int16 wlan_link
int16 wlan_level
int16 wlan_noise

The Tracks file is


float32 left
float32 right

When I Run the subscriber and the bag file I get this msg.

[ERROR] [1530994008.258613410]: Client [/demo_msg_subscriber] wants topic /republished/raposang/telemetry to have datatype/md5sum [pubsub/main_msg/1cb627db77ec9ba82345044061168d5b], but our version has [raposang_msgs/TelemetryOgre/8feb37b7d41c1c54d763ad901a31faa6]. Dropping connection.

What is wrong with this msg? I am using ROS indigo.

2018-08-08 04:05:26 -0500 received badge  Notable Question (source)
2018-08-07 16:41:45 -0500 received badge  Popular Question (source)
2018-08-07 15:29:46 -0500 answered a question I have a slow computer, and gtk-cairo with ROS does not work as I would like.

The data I use for the animation cames from ROS, that is the only relation.

2018-08-06 06:24:33 -0500 asked a question I have a slow computer, and gtk-cairo with ROS does not work as I would like.

I have a slow computer, and gtk-cairo with ROS does not work as I would like. The problem is related with my machine is

2018-07-25 05:53:25 -0500 asked a question Error :IA__gtk_widget_set_events: assertion

Error :IA__gtk_widget_set_events: assertion When I run my program I get this error, a the problems runing my subscriber

2018-07-17 15:24:35 -0500 received badge  Notable Question (source)
2018-07-17 13:40:48 -0500 answered a question signal 'draw' is invalid for instance ... of type 'GtkDrawingArea'

Problem solve. The main issue here is mixing GTK2.0 and GTK3.0, a few changes had to be made on this code. 1º Here we

2018-07-17 10:32:57 -0500 received badge  Popular Question (source)
2018-07-17 04:29:56 -0500 edited question signal 'draw' is invalid for instance ... of type 'GtkDrawingArea'

signal 'draw' is invalid for instance ... of type 'GtkDrawingArea' I don't understand the reason for this error. After

2018-07-16 13:29:09 -0500 edited question signal 'draw' is invalid for instance ... of type 'GtkDrawingArea'

signal 'draw' is invalid for instance ... of type 'GtkDrawingArea' I don't understand the reason for this error. After

2018-07-16 13:27:28 -0500 asked a question signal 'draw' is invalid for instance ... of type 'GtkDrawingArea'

signal 'draw' is invalid for instance ... of type 'GtkDrawingArea' I don't understand the reason for this error. Here g

2018-07-13 10:53:33 -0500 received badge  Enthusiast
2018-07-12 08:55:37 -0500 asked a question trying to use cairo gtk and ros at the same time

trying to use cairo gtk and ros at the same time I am having problems compiling this code, can someone give me a hint on

2018-07-09 08:28:52 -0500 received badge  Notable Question (source)
2018-07-08 05:39:19 -0500 answered a question having problems connecting a bag file with a subscriber - Indigo

Problem solved. I only had to respect the original names in the bag file, once I put every thing in there original name

2018-07-08 05:37:42 -0500 received badge  Popular Question (source)
2018-07-07 16:01:53 -0500 received badge  Famous Question (source)
2018-07-07 15:58:08 -0500 asked a question having problems connecting a bag file with a subscriber - Indigo

having problems connecting a bag file with a subscriber - Indigo I have to types of msgs and I am having problems making

2018-02-08 02:52:50 -0500 received badge  Famous Question (source)
2017-05-10 04:28:42 -0500 received badge  Notable Question (source)
2017-05-10 04:28:42 -0500 received badge  Popular Question (source)
2016-09-12 10:27:20 -0500 received badge  Famous Question (source)
2016-09-12 10:11:41 -0500 received badge  Notable Question (source)
2016-09-09 18:55:08 -0500 answered a question Several Images in one msg, How can I do it?

After changing from virtual machine to PC, the problem was solved.

The program runs as it should.

2016-08-23 10:49:31 -0500 received badge  Popular Question (source)
2016-08-23 10:28:33 -0500 answered a question Changing system, new problems gtk.h not found.

Solved, it's quite simple.

First: change GTK to GTK2 Second: add this line - find_package(GTK2 COMPONENTS gtk)

2016-08-23 10:00:33 -0500 received badge  Editor (source)
2016-08-23 06:13:49 -0500 answered a question uwsim: uwsimbenchmarks/GTpublish.h: No such file or directory

When installing the catkin compiles, and the problem is the compilation, It those not found <uwsimbenchmarks gtpublish.h="">, check you dependencies, CMakefile.txt and the package.xml, the problem is there.

Rodrigo

2016-08-23 06:00:15 -0500 asked a question Changing system, new problems gtk.h not found.

I'm trying to compile one file, that compiles fine in hydro, and gtk 2.0, but now the system as been upgraded to indigo, the file seems to compile but doesn't find gtk.h, I have gtk2.0 and gtk3.0 on my system, and I already compiled with gtk 2.0, no problems. My problem seems to be the catkin files. Can anyone give me a hand, pls.

CMakefile.txt

cmake_minimum_required(VERSION 2.8.3)
project(myVideoImageSubscriber)

find_package(catkin REQUIRED COMPONENTS
  roscpp
  std_msgs
  cv_bridge
  image_transport
  sensor_msgs
)

find_package(PkgConfig REQUIRED)
find_package(OpenCV)

pkg_check_modules(gtk REQUIRED gtk+-2.0)
pkg_check_modules(OpenCV REQUIRED opencv)

catkin_package(
  CATKIN_DEPENDS roscpp std_msgs
)

include_directories(
  ${catkin_INCLUDE_DIRS}
  ${Bost_INCLUDE_DIRS}
  ${OpenCV_INCLUDE_DIRS}
  ${OpenCV_CFLAGS}
  ${GTK_INCLUDE_DIRS}
  ${GTK_CFLAGS}
)

add_executable(myvideoimagesubscriber src/myVideoImageSubscriber.cpp)

add_dependencies(myvideoimagesubscriber cv_bridge roscpp std_msgs image_transport sensor_msgs)

target_link_libraries(myvideoimagesubscriber
   ${catkin_LIBRARIES}
   ${Boost_LIBRARIES}
   ${OpenCV_LIBRARIES}
   ${GTK_LIBRARIES}
)

Thank's in advance.

2016-08-19 08:40:13 -0500 commented question Several Images in one msg, How can I do it?

Sorry my mistake, I forgot to show do_ros function.

gboolean do_ros ( gpointer data ) {

// Showing the main window, with the attached image.
if ( GTK_IS_WIDGET (globalTopLevelWindow) )
{

    gtk_widget_show_all ( globalTopLevelWindow );       

}

if (ros::ok())
{

    ros::spinOnce();
2016-08-19 08:36:32 -0500 commented answer Several Images in one msg, How can I do it?

Right now I'm changing the system to Indigo, later I was using a virtual machine in windows. About your quetions, one of my node paths, was wrong, corrected. Second I tried to use printf or cout, but never got anything on the screen, compiling in Indigo and testing again. Later I will see the rest.

2016-08-19 05:02:17 -0500 asked a question Several Images in one msg, How can I do it?

The code I have is the following:

 
int main(int argc, char **argv)
{
    ros::init(argc, argv, "image_listener");
        ros::NodeHandle nh;
    ros::Rate loop_rate(100);       // Rate class instance. 
    ImageManagmentStruct LeftCameraImageStructForGrid, RightCameraImageStructForGrid, KinectImageStructForGrid, KinectDepthImageStructForGrid;      
    ImageManagmentStruct LeftCameraImageStructOneImage, RightCameraImageStructOneImage, KinectImageStructOneImage, KinectDepthImageStructOneImage;

    // Initializing the image/camera data structures.   
    dataStructuresInitialization ( &LeftCameraImageStructForGrid, 
                                   &RightCameraImageStructForGrid, 
                                   &KinectImageStructForGrid,
                                   &KinectDepthImageStructForGrid,
                                   &LeftCameraImageStructOneImage,
                                   &RightCameraImageStructOneImage,
                                   &KinectImageStructOneImage,
                                   &KinectDepthImageStructOneImage
                                 );

    // GTK library initialization
    gtk_init ( &argc, &argv );

    // Creating a top level window and connecting it to a sygnal.    
    createMainInterfaceWindow (); 

    // Creating a fixed container, which will hold all the widgets of the GUI.
    createFixedContainer ();

    // Creating a GtkGrid widget, which will contain all the images.
    createGtkTable ();

    // Attaching the created table to the Container.
    gtk_fixed_put (GTK_FIXED (pGlobalFixedContainer), pGlobalGtkTable, IMAGES_HORIZONTAL_PLACEMENT, IMAGES_VERTIACL_PLACEMENT);

    // Subscribing in order to receive images.

    //ros::Subscriber subLeft = nh.subscribe<sensor_msgs::image> ("/republished/bb2/triclops/left/image_raw", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[0], globalArrayForSingleImages[0]));  
    // ros::Subscriber subRight = nh.subscribe<sensor_msgs::image> ("/republished/bb2/triclops/right/image_raw", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[1], globalArrayForSingleImages[1])); 
    // ros::Subscriber subKinect = nh.subscribe<sensor_msgs::image> ("/republished/usb_cam/image_raw", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[2], globalArrayForSingleImages[2]));
    // ros::Subscriber subKinectDepth = nh.subscribe<sensor_msgs::image> ("/republished/usb_cam/image_raw", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[3], globalArrayForSingleImages[3]));

    //New Code, replacing the ros::Subscriber
    image_transport::ImageTransport it(nh);
    image_transport::Subscriber subLeft = it.subscribe("/republished/bb2/triclops/left/image_raw", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[0], globalArrayForSingleImages[0]));  
    image_transport::Subscriber subRight = it.subscribe("/republished/bb2/triclops/right/image_raw", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[1], globalArrayForSingleImages[1]));
    image_transport::Subscriber subKinect = it.subscribe("/republished/usb_cam/image_raw/", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[2], globalArrayForSingleImages[2]));
    image_transport::Subscriber subKinectDepth = it.subscribe("/republished/usb_cam/image_raw//republished/bb2/triclops/left/image_raw", 2, boost::bind(imageCallbackWrapper, _1, globalArrayOfImagesForGrid[3], globalArrayForSingleImages[3]));

    g_timeout_add(1000 / 100, do_ros, NULL);

    gtk_main();

    if ( MY_FUNCTIONS_ENTRANCE_CONTROL ) { printf ("\033[01;33mExited from the main function normally.\033[01;37m\n" ); }
    return 0;
}

I try to get the images, but I got none. A simple receiver code, works fine with the Rosbag and one image, this code thosen't make the connections, can any one help me with this problem. pls.

Rodrigo

2016-08-19 04:50:58 -0500 commented answer Don´t understand ROS::nodehandler

How do I mark answered?

2016-08-18 17:46:51 -0500 commented answer Don´t understand ROS::nodehandler

You´re right, that was the problem. Thanks.

2016-08-18 03:06:24 -0500 received badge  Notable Question (source)
2016-08-17 10:37:38 -0500 received badge  Popular Question (source)
2016-08-15 12:37:11 -0500 asked a question Don´t understand ROS::nodehandler

I have the following code.

double globalResizingFactor; ros::init(argc, argv, "image_listener"); ros::NodeHandle nh; ...

if (!nh.getParam("resizing_factor", globalResizingFactor)) { ROS_ERROR (" .... "); ros::shutdown(); }

This code compiles with no problems, but it is a transition from a old ROS distribution to a more recente one, this is, Fuerte to Hydro, both are very diferent, a made a huge problem to be solved, the fact is that I was able to change e few things and compile.

When Runing It stops here, at this if, since the globalResizingFactor isn´t got, it fails. Please some help understanding what´s hapening in this code.

Rodrigo