Skip to content
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

Gazebo Classic Simulation humble #78

Merged
merged 18 commits into from Jul 5, 2023
Merged

Gazebo Classic Simulation humble #78

merged 18 commits into from Jul 5, 2023

Conversation

olmerg
Copy link
Collaborator

@olmerg olmerg commented Jun 30, 2023

This is a new feature for ros2 which let to spawn in a gazebo world an andino robot
In this PR we are not going to support multiple robots, just one.

🎉 New feature

Fixes #47

Summary

To reproduce

colcon build --symlink-install --packages-skip andino_base
. /usr/share/gazebo/setup.bash
. install/setup.bash
ros2 launch andino_gazebo andino_one_robot.launch.py

TODO:

  • Add camera sensor
  • Add ros control support
  • documentation

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if it affects the public API)

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.

docker/Dockerfile Outdated Show resolved Hide resolved
Copy link
Collaborator

@francocipollone francocipollone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @olmerg for pushing this! I left some comments!

@francocipollone
Copy link
Collaborator

Also @olmerg , mind correctly signing the commits:

image

@gonzodepedro
Copy link
Collaborator

Suggestion, If you add to the instructions:

rosdep install --from-paths src --ignore-src -i -y

Then, you can remove the --packages-skip andino_base in the call to colcon

@olmerg
Copy link
Collaborator Author

olmerg commented Jun 30, 2023

Suggestion, If you add to the instructions:

rosdep install --from-paths src --ignore-src -i -y

Then, you can remove the --packages-skip andino_base in the call to colcon

that great, that also eliminate the requirment to modify the dockerfile

Copy link
Member

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One extra comment, rviz complains with the following:

[rviz2-5] Warning: Invalid frame ID "right_wheel" passed to canTransform argument source_frame - frame does not exist
[rviz2-5]          at line 93 in ./src/buffer_core.cpp
[rviz2-5] Warning: Invalid frame ID "left_wheel" passed to canTransform argument source_frame - frame does not exist 

And you can see the following:

andino_rviz

andino_gazebo/CMakeLists.txt Outdated Show resolved Hide resolved
andino_gazebo/README.MD Outdated Show resolved Hide resolved
andino_gazebo/README.MD Outdated Show resolved Hide resolved
andino_description/urdf/andino.urdf.xacro Outdated Show resolved Hide resolved
Copy link
Collaborator

@francocipollone francocipollone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job @olmerg ! 🙌 It is looking good, I left some comments!

  • Three extra comments:
    • Check the DCO that is failing.
    • Update branch to bring last commits form humble branch. (it shouldn't collide but improve robot description due to camera mesh being added)
    • Add andino_gazebo to the current CI workflow.

andino_description/urdf/andino.urdf.xacro Outdated Show resolved Hide resolved
)


ament_package()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: missing empty line in the end of the file

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think it is resolved
image

andino_gazebo/README.MD Outdated Show resolved Hide resolved
andino_gazebo/README.MD Outdated Show resolved Hide resolved
andino_gazebo/launch/andino_with_ros_control.launch.py Outdated Show resolved Hide resolved
andino_gazebo/urdf/andino.gazebo.xacro Outdated Show resolved Hide resolved
andino_gazebo/launch/spawn_robot.launch.py Outdated Show resolved Hide resolved
andino_gazebo/launch/spawn_robot.launch.py Outdated Show resolved Hide resolved
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
@olmerg
Copy link
Collaborator Author

olmerg commented Jul 4, 2023

Some consideration has been made for the last commit:

  • Default test has been added through the cmakelist.txt. An issue has been found to detect correctly the license in the python files which has been solved like described in ament_lint , nav2 example.
  • The issue of the caster wheel has not been solved PR 79
  • The python files has been formatted with black
  • ros2 control support is not part of this PR.

Copy link
Member

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure what's wrong but when I run it (note I had to change the world because it does not work as it is as well) there is a new error:

$ ros2 launch andino_gazebo andino_one_robot.launch.py world:=/usr/share/gazebo-│
11/worlds/animated_box.world                                                                             │
[INFO] [launch]: All log files can be found below /home/agalbachicar/.ros/log/2023-07-05-06-44-37-642473-│
acquara-13375                                                                                            │
[INFO] [launch]: Default logging verbosity is set to INFO                                                │
[ERROR] [launch]: Caught exception in launch (see debug for traceback): XML or text declaration not at st│
art of entity: line 5, column 0

Gazebo just opens well, but the robot fails to be spawned. I think the problem occurs within the process_file() in spawn_robot.launch.py.

andino_gazebo/launch/spawn_robot.launch.py Outdated Show resolved Hide resolved
andino_gazebo/launch/andino_one_robot.launch.py Outdated Show resolved Hide resolved
andino_gazebo/launch/andino_one_robot.launch.py Outdated Show resolved Hide resolved
@francocipollone
Copy link
Collaborator

francocipollone commented Jul 5, 2023

Not sure what's wrong but when I run it (note I had to change the world because it does not work as it is as well) there is a new error:

$ ros2 launch andino_gazebo andino_one_robot.launch.py world:=/usr/share/gazebo-│
11/worlds/animated_box.world                                                                             │
[INFO] [launch]: All log files can be found below /home/agalbachicar/.ros/log/2023-07-05-06-44-37-642473-│
acquara-13375                                                                                            │
[INFO] [launch]: Default logging verbosity is set to INFO                                                │
[ERROR] [launch]: Caught exception in launch (see debug for traceback): XML or text declaration not at st│
art of entity: line 5, column 0

Gazebo just opens well, but the robot fails to be spawned. I think the problem occurs within the process_file() in spawn_robot.launch.py.

That was on me, I fixed the issue already #91 . Rebasing the branch against humble should be enough.

Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
@agalbachicar agalbachicar self-requested a review July 5, 2023 12:46
agalbachicar
agalbachicar previously approved these changes Jul 5, 2023
Copy link
Member

@agalbachicar agalbachicar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@olmerg olmerg dismissed agalbachicar’s stale review July 5, 2023 12:48

The merge-base changed after approval.

@agalbachicar
Copy link
Member

@olmerg you need to review the list of commits and amend those that do not have a signature (-s flag when committing).

Signed-off-by: olmerg <olmerg@gmail.com>
Signed-off-by: olmerg <olmerg@gmail.com>
Copy link
Collaborator

@francocipollone francocipollone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Just some minor comments to go!

andino_gazebo/package.xml Show resolved Hide resolved
)


ament_package()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I don't think it is resolved
image

andino_gazebo/urdf/andino.gazebo.xacro Outdated Show resolved Hide resolved
andino_gazebo/urdf/andino.gazebo.xacro Outdated Show resolved Hide resolved
andino_gazebo/urdf/andino.gazebo.xacro Outdated Show resolved Hide resolved
andino_gazebo/urdf/andino.gazebo.xacro Outdated Show resolved Hide resolved
andino_gazebo/urdf/andino.gazebo.xacro Outdated Show resolved Hide resolved
Signed-off-by: olmerg <olmerg@gmail.com>
Copy link
Collaborator

@francocipollone francocipollone left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@olmerg olmerg changed the title Gazebo Classic Simulation humble (WIP) Gazebo Classic Simulation humble Jul 5, 2023
@olmerg olmerg merged commit 43017a8 into humble Jul 5, 2023
3 checks passed
@francocipollone francocipollone deleted the olmerg_simulation_humble branch July 21, 2023 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Provide a gazebo simulation
5 participants