-
Notifications
You must be signed in to change notification settings - Fork 773
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ROS2: boostrap repo and convert gazebo_msgs #769
Conversation
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.
Thanks for getting the ball rolling! I left some preliminary comments, mostly about documentation and styling.
gazebo_msgs/package.xml
Outdated
</description> | ||
|
||
<maintainer email="jrivero@osrfoundation.org">Jose Luis Rivero</maintainer> | ||
<author>John Hsu</author> | ||
<maintainer email="ecorbellini@ekumenlabs.com">Ernesto Corbellini</maintainer> |
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.
Are the author and maintainer changes on purpose?
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.
Oops, will fix
float64[] hiStop # joint limit | ||
float64[] loStop # joint limit | ||
float64[] hi_stop # joint limit | ||
float64[] lo_stop # joint limit |
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.
nitpick: align the comments on the right
gazebo_msgs/srv/ApplyBodyWrench.srv
Outdated
# if start_time is not specified, or | ||
# start_time < current time, start as soon as possible | ||
duration duration # optional duration of wrench application time (seconds) | ||
builtin_interfaces/Duration duration # optional duration of wrench application time (seconds) |
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.
nit: comment alignment
gazebo_plugins/src/node_example.cpp
Outdated
@@ -0,0 +1,33 @@ | |||
#include <gazebo_plugins/node_example.hpp> |
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.
Missing copyright header here and on several other files
namespace gazebo_ros | ||
{ | ||
|
||
/// Executor run in a seperate thread to handle events from all #Node instances |
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.
Could you use doxygen syntax on the whole documentation? i.e. /// \brief
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.
\brief
is implied with the first line of a doxygen block so my personal style preference is to omit it (it will still generate correctly)
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.
Interesting, I didn't know. I'm good leaving it out then.
NotInitializedException(); | ||
}; | ||
|
||
typedef std::shared_ptr<Node> SharedPtr; |
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.
How about making this type more explicit? Such as NodeSharedPtr
? That should make the API clearer and we don't end up reserving a very general "keyword".
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.
This is the convention used in other parts of the ROS2 codebase so far. The typedef is within the class, so it is accessed as gazebo_ros::Node::SharedPtr
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.
Ahh got it, good call!
*/ | ||
static SharedPtr Create(const std::string& node_name); | ||
|
||
/** |
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.
I realize the ROS 1 code mixes ///
with /**
, the ROS 2 developer guide accepts either and they're both supported by Doxygen.
I think there's value in being consistent within a single repository though, so I think we should define now which one to use. I don't have a preference, so I'll leave up to you or anyone with strong opinions.
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.
I agree it should be consistent. Looks like some other ros2 code always starts with ///
and adds /** */
if more lines are required
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.
Oh interesting, that looks weird to me on a first look, I wonder how that gets rendered and what's the rationale behind it.
|
||
/// Initialize ROS with the command line arguments. | ||
/// Must be called ONCE before ande #Node instances are created | ||
static void InitROS(int argc, char** argv); |
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.
Document input params
gazebo_ros/package.xml
Outdated
<name>gazebo_ros</name> | ||
<version>2.8.4</version> | ||
<description> | ||
Provides ROS plugins that offer message and service publishers for interfacing with <a href="http://gazebosim.org">Gazebo</a> through ROS. | ||
Formally simulator_gazebo/gazebo | ||
Utilities to interface with Gazebo <a href="http://gazebosim.org">Gazebo</a> through ROS. |
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.
Gazebo is written twice
gazebo_ros/package.xml
Outdated
<!-- | ||
Need to use gazebo_dev since run script needs pkg-config | ||
See: https://github.com/ros-simulation/gazebo_ros_pkgs/issues/323 for more info | ||
--> | ||
<exec_depend>gazebo_dev</exec_depend> |
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.
gazebo_dev
is already listed above
gazebo_msgs/CMakeLists.txt
Outdated
"srv/SetJointTrajectory.srv" | ||
"srv/GetLightProperties.srv" | ||
"srv/SetLightProperties.srv" | ||
) |
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.
How do you feel about alphabetizing this list? The messages are already ok
How about splitting this PR so it's easier to review? It could start with just porting the messages and moving all unported code to the separate folder. |
gazebo_dev/package.xml
Outdated
@@ -1,5 +1,6 @@ | |||
<?xml version="1.0"?> | |||
<package format="2"> | |||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | |||
<package format="3"> |
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.
Can't we keep format 2?
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.
We could, but format 3 offers some advantages and will likely be supported for longer. It seems to be the default for new ROS2 packages
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.
In general, I think it's best not to upgrade unless there's an explicit reason to, so we keep compatibility with older tools.
It doesn't look to me that we're using anything specific to version 3 here, so I don't see a need for the move. But it doesn't look like it's breaking anything either, so we can leave it as 3 for as long as we don't see a problem with it.
The PR splitting sounds good, time to put on my git hat |
Split out everything besides the file moves and message conversions. The rest is on other branches I can PR when this one is in |
gazebo_msgs/package.xml
Outdated
|
||
<build_depend>rosidl_default_generators</build_depend> |
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.
Should this be buildtool_depend
?
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.
Switched, that seems like the right way to do it
Thanks, @ironmig ! This PR looks good to me, I just have one small comment left about |
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.
Looks good to me!
.ros1_unported
, which has IGNORE files to be ignored by ament/colcon. This will ensure the package builds and individual files will be moved back to into the root directory as they are ported over