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

davidgitz's profile - activity

2017-08-12 09:20:39 -0500 received badge  Famous Question (source)
2016-10-18 08:42:06 -0500 received badge  Notable Question (source)
2016-05-17 05:49:40 -0500 received badge  Popular Question (source)
2016-05-15 09:16:22 -0500 received badge  Student (source)
2016-05-15 08:25:52 -0500 asked a question Subscribe to topic with a wildcard

Hi, I'm writing my own diagnostic node. I have multiple tasks that all publish a resource message, which contains information about CPU usage, RAM usage, etc to "task_name/resource" . I would like the diagnostic task to subscribe to every topic of this name. The way I plan on implenting this is to list all the topics published using getPublishedTopics(), search for the string "resource" and subscribe to those with the same callback. However I was wondering if there was a mechanism in place with the normal subscriber initialization to subscribe with a wildcard, something like "*/resource". If it matters I am writing in C++.

Thank you!

2015-12-10 12:46:01 -0500 received badge  Famous Question (source)
2015-10-14 01:11:36 -0500 received badge  Notable Question (source)
2015-10-13 19:05:37 -0500 answered a question gmapping Map not updating correctly.

So the answer was to add: , link:http://answers.ros.org/question/83566/gmapping-no-transform-from-map-odom_combined/ which then creates a map that doesn't move with the Rover and is re-generated with new scan data. However for my application this won't work apparently. I am using Sonar sensors (not LIDAR) and the map it creates is just not very useful. I knew this would be an issue from the start but hoped otherwise. I will create my own occupancy grid generator. Thanks for your help!

2015-10-13 18:25:35 -0500 commented answer gmapping Map not updating correctly.

@Stefan - Yes I do. I added 2 more obtacles. When I drive the Rover forward the map moves along with the Rover. Honestly I don't really care about the transform from odom -> map, I only want the occupancy grid. Is there a way to just compute this with out the extra tf stuff?

2015-10-13 18:22:44 -0500 received badge  Popular Question (source)
2015-10-13 06:37:13 -0500 commented answer gmapping Map not updating correctly.

@Stefan - Thanks for this! I found 2 bugs in my code, one that was not calculating when an obstacle was in view of the beam, and not setting the beam distance to -1 when no obstacle was present. After fixing this though I am still seeing the same problems, does my tf structure/numbers make sense?

2015-10-13 06:34:22 -0500 received badge  Supporter (source)
2015-10-10 09:10:04 -0500 asked a question gmapping Map not updating correctly.

Hi everybody. I am having an issue with gmapping. I have a simulated Rover that is publishing LaserScan messages and odometry data. Basically I am seeing that when I drive my Rover next to an obstacle in a straight line, the occuppied cells created by gmapping (seen in rviz) moves with the Rover. I have followed REP-103 and REP-105 and the "Seting up your robot using tf" as close as I can tell. Sorry for the long post.

For tf frames I have:

geometry_msgs::Quaternion base_quat = tf::createQuaternionMsgFromYaw(0.0);
geometry_msgs::TransformStamped base_trans;
base_trans.header.stamp = current_time;
base_trans.header.frame_id = "odom";
base_trans.child_frame_id = "base_link";
base_trans.transform.translation.x = current_Northing_m;
base_trans.transform.translation.y = current_Easting_m;
base_trans.transform.translation.z = -0.2794;
base_trans.transform.rotation = base_quat;
base_broadcaster.sendTransform(base_trans);

geometry_msgs::Quaternion scan_quat = tf::createQuaternionMsgFromYaw(0.0);
geometry_msgs::TransformStamped scan_trans;
scan_trans.header.stamp = ros::Time::now();
scan_trans.header.frame_id = "base_link";
scan_trans.child_frame_id = "laser";
scan_trans.transform.translation.x = 0.0;
scan_trans.transform.translation.y = 0.0;
scan_trans.transform.translation.z = 0.3556;
scan_trans.transform.rotation = scan_quat;
scan_broadcaster.sendTransform(scan_trans);

And my frame links: image description

As you can see I am not doing anything with rotation yet.

And here are some pictures of my Simulated Rover in my GUI, along with the output of Rviz When I start my program: image description image description

And now when the Rover is driven alongside the Obstacle: image description image description

And now when the Rover is driven well past the Obstacle: image description image description As you can see, the Map is shifting with the Rover.

And here is some output of the gmapping package:

Odom Pose Theta: 0.000000 MPose Theta: 0.430916
GOT MAP
 Center x: -0.400000 y: -0.400000
 update frame 3624
 update ld=2.91054e-14 ad=0
 Laser Pose= 7.70492 -3 0
 m_count 108
 Average Scan Matching Score=499.238
 neff= 29.9807
 Registering Scans:Done

It is worth mentioning that in rviz, when I drive the Rover forwards, the Red axis on the tf frame is the one moving in the correct direction.

2015-08-31 09:48:47 -0500 received badge  Famous Question (source)
2015-05-20 17:44:50 -0500 received badge  Enthusiast
2015-05-19 17:20:07 -0500 commented answer gmapping pacakage Overlaying with catkin workspaces

I had not built it. I had to install the following packages:libsdl-image1.2-dev libsdl-image-gst yaml-cpp along with cloning the navigation stack. After that I got it to work. Thanks!

2015-05-18 21:43:04 -0500 commented answer gmapping pacakage Overlaying with catkin workspaces

@bvbdort I don't want to hijack this thread but I think my problem is identical. I have done a git clone for the slam_gmapping and openslam_gmapping and put in: ~/catkin_ws/src Then I did: source /opt/ros/groovy/setup.bash and source ~/catkin_ws/devel/setup.bash and get the same error as the OP.

2015-05-14 21:29:54 -0500 commented answer gmapping pacakage Overlaying with catkin workspaces

@bvbdort Can you please provide some clarification? I am having the same problem, and the Workspace Overlay Tutorial isn't helping me. Thanks!

2015-01-20 08:42:49 -0500 received badge  Notable Question (source)
2015-01-16 14:51:45 -0500 received badge  Popular Question (source)
2015-01-16 08:39:19 -0500 commented question Use 3rd party library with ROS Groovy & C++

I tried to make this question easier to understand, I guess that backfired. "libfile" here is just the name of my particular library, (RoboPiLib), with the header/object files RoboPiLib.h & RoboPiLib.o
If that didn't answer your question, how should I define libfile? With link_directories(path)?

2015-01-15 21:22:00 -0500 asked a question Use 3rd party library with ROS Groovy & C++

Hi, I've been doing some research and though I found similar questions their solutions didn't work for me. I am having trouble with compiling my project while using a 3rd party library. I have the .h and the .o files for the library, but that developer is not currently able to give me the .cpp file.

I am a bit confused as to where exactly to put the .h and .o files and what to put in the CMakeLists file. libfile.h and libfile.o represent the 3rd party library files.

Currently I have both of these files in catkin_ws/src/mypackage/include/mypackage/ In my project code I have an include:

#include "mypackage/libfile.h"

In my CMakeLists.txt file I have:

#include_directories(include
  ${catkin_INCLUDE_DIRS}
)

add_executable(mypackage src/mypackage_code.cpp)

target_link_libraries(mypackage 
  ${libfile}
  ${catkin_LIBRARIES}
)

When I do a catkin_make I get a lot of undefined reference to function errors in my project code referencing from this library that I believe are because catkin isn't linking to the other library, like:

mypackage_code.cpp:(.text.startup+0x33a): undefined reference to 'some_function_in_3rdparty_library'

I've tried to only paste the information relevant to this issue to help others. If you want more specifics that's no problem. Thank you very much for your help.

2014-04-11 03:51:23 -0500 received badge  Famous Question (source)
2014-03-30 22:30:04 -0500 received badge  Notable Question (source)
2014-03-20 04:48:08 -0500 received badge  Popular Question (source)
2014-03-19 10:28:03 -0500 asked a question See point cloud in rviz

Hi, I'm trying to view a point cloud that I am generating with an AR Drone in rviz. I have the transform set as /ardrone_base_link --> /cam_front and using tf_echo I see:

rosrun tf tf_echo /ardrone_base_link /cam_front
At time 1395260250.630
- Translation: [0.007, 0.209, -0.001]
- Rotation: in Quaternion [-0.677, 0.034, -0.037, 0.735]
            in RPY [-1.489, -0.000, -0.101]
At time 1395260251.568
- Translation: [0.006, 0.209, -0.001]
- Rotation: in Quaternion [-0.677, 0.034, -0.037, 0.735]
            in RPY [-1.489, -0.000, -0.101]

If i do an echo on the /tf I get:

rostopic echo /tf
    transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1395260346
        nsecs: 276967023
      frame_id: /ardrone_base_link
    child_frame_id: /cam_front
    transform: 
      translation: 
        x: 0.0063893099241
        y: 0.209490348767
        z: -0.000927047945466
      rotation: 
        x: -0.676587213276
        y: 0.0340744443113
        z: -0.0371685138251
        w: 0.734634042674

And the tf_monitor:

    rosrun tf tf_monitor /ardrone_base_link /cam_front 
RESULTS: for /ardrone_base_link to /cam_front Chain is: /ardrone_base_link -> NO_PARENT -> /ardrone_base_link -> /ardrone_base_link Net delay     avg =
    0.069172: max = 0.21447

And I am publishing the point_cloud on /ardrone/point_cloud:

rostopic type /ardrone/point_cloud
sensor_msgs/PointCloud2

If I do a rostopic echo on the point_cloud I get proper data.

When I try to use rviz on the point_cloud with the above tranform I get the following errors whenever a new point_cloud message is published:

Message from [/drone_stateestimation] has a non-fully-qualified frame_id [1]. Resolved locally to [/1].  This is will likely not work in multi-robot systems.  This message will only print once

And the point_cloud never shows up. I also get message in rviz saying "Showing [0] points from [0] messages."

In my tf broadcase I am doing:

tf::StampedTransform t = tf::StampedTransform(tr,ros::Time::now(),"/ardrone_base_link","/cam_front");

I think part of the problem is the seq:0 in the rostopic echo /tf never changes, but I don't know how to fix that. There could be other problems too. Any ideas?