-
Notifications
You must be signed in to change notification settings - Fork 139
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
Added ROS parameter instead of gflag to ros_gz_sim::create #463
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.
Do you mind to sign the commit ?
ros_gz_sim/src/create.cpp
Outdated
// declaring ros param | ||
|
||
ros2_node->declare_parameter("world",""); |
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.
// declaring ros param | |
ros2_node->declare_parameter("world",""); | |
// declaring ros param | |
ros2_node->declare_parameter("world",""); |
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.
Yeah I can do that, sorry this was my first time and forgot to do that before. I will make the changes and will push again.
ros_gz_sim/src/create.cpp
Outdated
std::string world_,file_,param_,string_,topic_,name_; | ||
bool allow_renaming_; | ||
double x_,y_,z_,R_,P_,Y_; |
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 we use underscore at the end when the variables are attributes of class, do you mind to remove the undercore at the end of tha variable name ?
std::string world_,file_,param_,string_,topic_,name_; | |
bool allow_renaming_; | |
double x_,y_,z_,R_,P_,Y_; | |
std::string world_, file_, param_, string_, topic_, name_; | |
bool allow_renaming_; | |
double x_, y_, z_, R_, P_, Y_; |
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.
Hi @ahcorde , I have made the changes could you please review again. Thank you.
Signed-off-by: yaswanth1701 <[email protected]>
69a6be0
to
fee5ea1
Compare
Signed-off-by: Yaswanth <[email protected]>
We have a PR similar to this in #465. That PR does not remove the gflags processing, so I'd be in favor of closing this and reviewing that. |
Hi @azeey yes, you can close this PR. There are few issues with my PC , So didn't got chance to work on this again, sorry for the trouble. |
Okay, thanks for your contribution though! |
🎉 New feature
Closes #459
Summary
Replaced all gflag arguments in
ros_gz_sim::create
with ROS parameters.Test it
can try running following command
To launch gazebo sim:
ros2 launch ros_gz_sim gz_sim.launch.py
To spawn a model:
ros2 run ros_gz_sim create --ros-args -p world:=”default” -p file:='https://fuel.ignitionrobotics.org/1.0/openrobotics/models/Gazebo'
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.