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

PerkinsJames's profile - activity

2021-06-10 05:56:00 -0500 received badge  Good Question (source)
2019-03-01 06:41:03 -0500 received badge  Good Question (source)
2017-07-07 13:57:26 -0500 received badge  Famous Question (source)
2017-02-17 03:46:21 -0500 received badge  Good Question (source)
2015-11-10 09:06:03 -0500 received badge  Self-Learner (source)
2015-11-10 09:02:04 -0500 received badge  Good Question (source)
2015-10-09 10:37:12 -0500 received badge  Nice Question (source)
2015-07-02 11:06:51 -0500 received badge  Nice Question (source)
2014-11-28 10:16:15 -0500 received badge  Nice Question (source)
2014-07-17 08:13:18 -0500 received badge  Guru (source)
2014-07-17 08:13:18 -0500 received badge  Great Answer (source)
2014-04-21 23:58:26 -0500 received badge  Nice Answer (source)
2014-01-28 17:27:45 -0500 marked best answer Determine if another rosnode is subscribing to published topic?

Is there a way for a publisher to check if another node is online and/or if the other node has established subscriptions to topics? (C++). I want to ensure that I don't send a configuration command if the subscriber has not yet subscribed.

I've seen this before that you can do this, but I don’t remember how.

Thanks!

2014-01-28 17:27:43 -0500 marked best answer Building only ROS messages or services

Is there a way to only build ROS message or services without building the entire package? I sometimes want to separate the building of the entire package and just the messages to more concisely determine if I have an issue.

Thanks!

2014-01-28 17:27:31 -0500 marked best answer Optional Fields in ROS Messages

Is there a way in ROS messages to have optional fields? I'm having a little trouble finding an answer to this or if there is any other method to make this possible.

For example, I would like to define a message that has 10 fields and sometimes only fill out 5 of those fields and publish the message. The issue is that the user on the other side does not have a way of knowing whether these 5 fields have been filled out or not and thus may pull garbage from some of the fields. There may be ways to get around it, such as define another variable that somehow signifies to the user that only a certain subset of data is filled out (they would know through the documentation).

I was wondering if there is any ROS-specific way of doing this that I've overlooked, if there are any plans to implement something like this, or if there are any suggestions people might have on how to do it?

Thanks!

2014-01-28 17:26:49 -0500 marked best answer QT Creator Issues (code completion)

Hoping someone can impart some QT Creator knowledge here...

After previously trying Eclipse and eventually getting it to work, I have decided to try QT Creator as many people have suggested because of its ease of setup (I am going to be recommending an IDE for other developers to use on my project).

This page: http://www.ros.org/wiki/IDEs indicates that there's very little setup necessary to get QT Creator working with ROS. These are the basic steps I followed:

1) Run qtcreator from the command line 2) Click File->Open file or project 3) Select CMakeLists.txt file in project 4) Click the "Run Cmake" button and finish.

Here are the issues that occur with no other modifications.

1) Code completion does not work with the boost threading library (only boost library I've tried) even though in my CMakeLists.txt file I have (compiles and runs fine):

rosbuild_add_boost_directories() rosbuild_link_boost(myprogram, thread)

In Eclipse I would manually add these include directories for boost in the Eclipse GUI. But from what I'm understanding, QTCreator with a existing cmake project does everything from that CMakeLists file. I am not seeing a way to manually add references/includes in qtcreator.

2) Code completion does not work correctly for another third party library. Again, it compiles and runs fine, but if I specify the directory of the libraries header files:

include_directories(~/include/directory/)

and then create a variable such as

objecttype x;

Typing "x." I expect to see a list of the variables inside that class for me to choose from. But actually, I get a list of ALL the variables from ALL classes defined anywhere inside the specified include_directories folder. There are a lot of header files there. This may be an issue with how I am writing the cmake file? CMake is not my favorite thing in the world.

3) (minor) qtcreator DOES find my custom defined messages and the code completion works, however the .msg files I've created are not listed in the "Projects" file list. Is there a way i should specify in the cmake file that these files are including in my project?

4) (question) When building a project with qtcreator, it seems to just call "make". Do I not need to specify it to call "rosmake"?

This may be too many questions for one question, but I thought it might be nice to keep them all together.

2014-01-28 17:26:28 -0500 marked best answer Wiki & Tutorial Updates

Hi everyone,

I couldn't find any proper procedure for updating the ROS wiki and tutorial pages, if there is one. Specifically I'm looking at fleshing out the openSUSE installation section and some pages on using custom messages.

Are there any ROS-specific update procedure description pages? I assume updating the openSUSE pages will be less of an issue than updating the widely used tutorials.

Thanks!

2014-01-28 17:26:26 -0500 marked best answer IDE development and code completion for messages

When I create a .msg file and then build my package using rosmake, it places the generated header file in package_name/msg_gen/cpp/include/...

However, when I include that header file in my program, ROS allows me to use

#include "package_name/messageexample.h"

The issue here is that an IDE (Eclipse, in my case) uses that include line to properly perform its code completion functions. Since that path is not an actual path, it doesn't work. Setting the proper include directories to the FULL path (msg_gen folder) above does not allow code completion to work properly either. The only solution (hack) I found, which is not good, is to do a #include of the FULL path right after the proper ROS format include.

Are there any solutions or better workarounds to this issue that anyone has found?

Update (not enough room in a comment): I have tried @AHornung answer using the tutorials on that page, but the command

rosmake --target=eclipse-project --specified-only *

does not work, providing the error:

WARNING: The following args could not be parsed as stacks or packages: ['CMakeLists.txt', 'include', 'mainpage.dox', 'Makefile', 'manifest.xml', 'src'] [ rosmake ] ERROR: No arguments could be parsed into valid package or stack names.

I have included the path to my package in ROS_PACKAGE_PATH and can correctly roscd to it. Running the same command without the --specified-only does produce the proper eclipse project files, but the same issue I originally had with the generated messages is still there.

Any thoughts? I am using Fuerte with Eclipse Juno.

Thanks!

2014-01-28 17:26:19 -0500 marked best answer Rapid Node Connecting/Disconnecting

A project I am working on needs the ability to rapidly create/connect and disconnect nodes from ROS. This could happen on the order of 20 nodes created and then destroyed in 15 seconds, all requesting data from other publishing nodes or through services. This would happen at random times throughout the run time of the robot.

I am assuming that ROS was not designed with this in mind, but I was wondering if anyone knew what behavior ROS would exhibit? e.g. significant latency in the transport due to overhead of connecting, etc.

Thanks a lot!

2013-05-01 09:35:46 -0500 received badge  Famous Question (source)
2013-02-06 15:41:01 -0500 received badge  Famous Question (source)
2013-01-18 07:59:17 -0500 received badge  Notable Question (source)
2012-12-19 09:24:19 -0500 received badge  Famous Question (source)
2012-12-13 09:32:25 -0500 commented answer ROSbag c++ boost compiling problems

You should add rosbag to your dependencies here. Does that solve it?

2012-12-13 09:22:51 -0500 commented answer Any way to check if/ensure that ROS node subscribed to topic properly?

good point. Check this previous post too for checking number of publishers that I had in the past: http://answers.ros.org/question/46116/determine-if-another-rosnode-is-subscribing-to-published-topic/ . Maybe there is something equivalent for a subscriber?

2012-12-12 02:57:45 -0500 commented answer Any way to check if/ensure that ROS node subscribed to topic properly?

Looking other subscribe functions on that page there is a part that shows this: ros::Subscriber sub = handle.subscribe("my_topic", 1, callback) and then gives an example of it in an if(handle). It comes from the statement ros::NodeHandle handle that you have to create before you make subscribers.