-
Notifications
You must be signed in to change notification settings - Fork 157
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] new package ros_ign_interfaces, provide some Ignition-specific ROS messages. #152
Conversation
… .msg and .srv files Signed-off-by: gezp <[email protected]>
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.
Thank you for the PR! I think this is an opportunity to improve on the message definitions from gazebo_msgs
, otherwise we could just depend on that package.
Some thoughts:
- The messages should match ign-msgs as much as possible, for seamless integration. This includes matching message names and fields.
- We should remove textual debug fields like
info
andstatus_message
, which aren't a standard practice on ROS and just make the messages larger. This kind of information can go into console logging instead. It's also difficult to standardize textual status messages so the receiver knows what to expect.
ros_ign_interfaces/package.xml
Outdated
<description>Message and service data structures for interacting with Ignition from ROS2.</description> | ||
<license>Apache 2.0</license> | ||
<maintainer email="[email protected]">Louise Poubel</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.
Feel free to add yourself as author 😉
@@ -0,0 +1,8 @@ | |||
string info # text info on this contact |
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 know the message on gazebo_msgs
has the info field, which is filled with debug information, but I believe this isn't a good practice. It makes the message larger and doesn't add any new information.
How about removing the field?
@@ -0,0 +1,11 @@ | |||
bool pause |
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.
Do you mind documenting all the fields in the message? Let's try to do better than ign-msgs
😬
@@ -0,0 +1,11 @@ | |||
bool pause |
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.
Do you mind calling this message WorldControl
to match ignition::msgs::WorldControl?
@@ -0,0 +1,5 @@ | |||
string name # Name of the Ignition Gazebo entity to be deleted. | |||
uint8 type # Type: Model or Light |
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 adding an entity message like ignition::msgs::Entity and using it here? Using the same pattern as Ignition should make it easier to maintain. It's also easier to only update one messsage if we add new entity types.
string collision1_name # name of contact collision1 | ||
string collision2_name # name of contact collision2 | ||
geometry_msgs/Wrench[] wrenches # list of forces/torques | ||
geometry_msgs/Wrench total_wrench # sum of forces/torques in every DOF |
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'd also suggest removing the total_wrench
field, because it doesn't add new information. The receiver can calculate it if they need it.
geometry_msgs/Wrench[] wrenches # list of forces/torques | ||
geometry_msgs/Wrench total_wrench # sum of forces/torques in every DOF | ||
geometry_msgs/Vector3[] contact_positions # list of contact position | ||
geometry_msgs/Vector3[] contact_normals # list of contact normals |
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.
Prefixing these fields with contact_
feels redundant.
geometry_msgs/Wrench total_wrench # sum of forces/torques in every DOF | ||
geometry_msgs/Vector3[] contact_positions # list of contact position | ||
geometry_msgs/Vector3[] contact_normals # list of contact normals | ||
float64[] depths # list of penetration depths |
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'd suggest changing the name of this message to Contact
so it matches ignition::msgs::Contact.
@@ -0,0 +1,12 @@ | |||
string name # New name for the entity, overrides the name on the SDF |
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 renaming this message to EntityFactory
so it matches ign-msgs
?
Signed-off-by: gezp <[email protected]>
Signed-off-by: gezp <[email protected]>
According to above advice, I modified and added the definition of message to make them match |
Signed-off-by: gezp <[email protected]>
@chapulina |
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.
Some style nits
ros_ign_interfaces/CMakeLists.txt
Outdated
find_package(geometry_msgs REQUIRED) | ||
find_package(rosidl_default_generators 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.
nit:
ros_ign_interfaces/README.md
Outdated
|
||
## Messages (.msg) | ||
|
||
* [Contact](msg/Contact.msg) : related to [ignition::msgs::Contact](https://github.com/ignitionrobotics/ign-msgs/blob/ign-msgs7/proto/ignition/msgs/contact.proto). Contant info bewteen collisions in Ignition Gazebo. |
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.
Same below
* [Contact](msg/Contact.msg) : related to [ignition::msgs::Contact](https://github.com/ignitionrobotics/ign-msgs/blob/ign-msgs7/proto/ignition/msgs/contact.proto). Contant info bewteen collisions in Ignition Gazebo. | |
* [Contact](msg/Contact.msg): related to [ignition::msgs::Contact](https://github.com/ignitionrobotics/ign-msgs/blob/ign-msgs7/proto/ignition/msgs/contact.proto). Contant info bewteen collisions in Ignition Gazebo. |
ros_ign_interfaces/msg/Entity.msg
Outdated
@@ -0,0 +1,13 @@ | |||
#Entity type: constant definition | |||
uint8 NONE = 0 |
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 you indent the default values at the same level ?
ros_ign_interfaces/msg/Entity.msg
Outdated
uint64 id #Entity unique identifier accross all types. Defaults to 0 | ||
string name #Entity name, which is not guaranteed to be unique. | ||
uint8 type #Entity type. |
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.
uint64 id #Entity unique identifier accross all types. Defaults to 0 | |
string name #Entity name, which is not guaranteed to be unique. | |
uint8 type #Entity type. | |
uint64 id # Entity unique identifier accross all types. Defaults to 0 | |
string name # Entity name, which is not guaranteed to be unique. | |
uint8 type # Entity type. |
@@ -0,0 +1,8 @@ | |||
bool pause # paused state. |
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.
Start comment with a Upper case ( in all msgs )
bool pause # paused state. | |
bool pause # Paused state. |
Signed-off-by: gezp <[email protected]>
… ROS messages. (#152) * add new package ros_ign_interfaces,provide some Ignition-specific ros .msg and .srv files Signed-off-by: gezp <[email protected]> * modify to match ign-msgs Signed-off-by: gezp <[email protected]> * add author info Signed-off-by: gezp <[email protected]> * modify comments Signed-off-by: gezp <[email protected]> * update code and doc style Signed-off-by: gezp <[email protected]>
… ROS messages. (#152) * add new package ros_ign_interfaces,provide some Ignition-specific ros .msg and .srv files Signed-off-by: gezp <[email protected]> * modify to match ign-msgs Signed-off-by: gezp <[email protected]> * add author info Signed-off-by: gezp <[email protected]> * modify comments Signed-off-by: gezp <[email protected]> * update code and doc style Signed-off-by: gezp <[email protected]>
This is migration of gazebo_ros_pkgs/gazebo_msgs for Ignition to provide some Ignition-specific ROS messages.
This package is necessary to implement some functions like this #70 .
ContactState.msg
andContactStates.msg
are migrated from gazebo_ros_pkgs/gazebo_msgsDeleteEntity.srv
andSpawnEntity.srv
are migrated from gazebo_ros_pkgs/gazebo_msgs and modified.ControlWorld.srv
refer to ign-msgs/proto/ignition/msgs/world_control.protoSetEntityPose.srv
is new srv file.