This repository has been archived by the owner on Aug 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 104
Allow supplying NodeHandle for initParam #168
Merged
sloretz
merged 2 commits into
ros:kinetic-devel
from
piyushk:piyushk/allow_supplying_nodehandle
Feb 10, 2017
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,6 +44,7 @@ | |
#include <tinyxml.h> | ||
#include <boost/shared_ptr.hpp> | ||
#include <boost/weak_ptr.hpp> | ||
#include <ros/ros.h> | ||
|
||
namespace urdf{ | ||
|
||
|
@@ -58,6 +59,8 @@ class Model: public ModelInterface | |
bool initFile(const std::string& filename); | ||
/// \brief Load Model given the name of a parameter on the parameter server | ||
bool initParam(const std::string& param); | ||
/// \brief Load Model given the name of a parameter on the parameter server using provided nodehandle | ||
bool initParamWithNodeHandle(const std::string& param, const ros::NodeHandle& nh = ros::NodeHandle()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding this looks good to me. It makes using the library easier. I think the specific case of ros-controls/ros_controllers#244 could be solved by using NodeHandle::resolveName("robot_description") and passing the fully qualified name into initParam() There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @sloretz: You're right. However, after discussion, we decided to go this route. |
||
/// \brief Load Model from a XML-string | ||
bool initString(const std::string& xmlstring); | ||
}; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wjwwood correct me if I'm wrong, but I think the package.xml needs
<build_export_depend>roscpp</build_export_depend>
because of this additionThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
build_export_depend
is unsupported inpackage.xml
format 1, which is what urdf is using. I believe the format 1 build_depend did that behavior by default.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK in package format 1 "exported build depends" have to be declared as
run_depend
.Source: http://www.ros.org/reps/rep-0127.html#run-depend-multiple and http://www.ros.org/reps/rep-0140.html#removing-run-depend