Repository Summary
Description | |
Checkout URI | https://github.com/acceleration-robotics/ros2-igt.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2021-08-24 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
igt_ignition | 0.0.0 |
igt_nav | 0.0.0 |
README
Igt One
Installation
- Install Ignition-Edifice or greater.
-
Build ros_ign packages for foxy from source as the binaries on apt are only supported for Ignition-Citadel as of now so some features might not work with the package from apt.
- Create a workspace
mkdir -p colcon_ws/src && cd colcon_ws/src
- Clone the repo
- Build the workspace & source the setup
colcon build --symlink-install
source install/setup.bash
Launch
Ign-Gazebo
ros2 launch igt_ignition igt_ignition.launch.py
Launch with ros_ign_bridge
for teleop
ros2 launch igt_ignition igt_ignition.launch.py with_bridge:=true
Make sure you UNPAUSE physics by clicking “play” button in bottom left corner of ignition
and then open another terminal and run
ros2 run teleop_twist_keyboard teleop_twist_keyboard
Publish velocities using ign topic
ign topic -t "/model/igt_one/cmd_vel" -m ignition.msgs.Twist -p "linear: {x: 2.0}, angular: {z: 0.0}"
Subscribe to topics using ign topic
ign topic -t "/igt_one/laserscan" -e
ign topic -t "/model/igt_one/odometry" -e
Navigation
Mapping with Slam Toolbox
- Install slam_toolbox from apt for ros2 foxy using:
sudo apt install ros-foxy-slam-toolbox
- Launch the simulation in ignition gazebo with ros_ign_bridge using:
ros2 launch igt_ignition igt_ignition.launch.py with_bridge:=true
-
Make sure you UNPAUSE physics by clicking “play” button in bottom left corner of ignition
-
Open another terminal and launch slam_toolbox for mapping and rviz2 using
online_sync_launch.py
fromigt_nav
package:
ros2 launch igt_nav online_sync_launch.py
- Open another terminal and run the ros2
teleop_twist_keyboard
node using:
ros2 run teleop_twist_keyboard teleop_twist_keyboard
- Use teleop to control the bot and map the world (as shown in the gif below). Save the map using:
ros2 run nav2_map_server map_saver_cli -f name_of_map_file
Navigation2
- Install navstack2 for ros foxy.
- Launch the simulation in ignition gazebo using:
ros2 launch igt_ignition igt_ignition.launch.py with_bridge:=true
-
Make sure you UNPAUSE physics by clicking “play” button in bottom left corner of ignition
-
Launch navigation2 using
navigation2.launch.py
launch file:
ros2 launch igt_nav navigation2.launch.py
This launches the bringup.launch.py
launch file from nav2_bringup
package and map/lab_map.yaml
and config/nav2.yaml
from igt_nav package as map and params_file. It also runs the rviz2 node with nav2 rviz config from nav2_bringup package.
- In rviz2, use
2D Pose Estimate
to provide initial pose of the bot to amcl so that it can start publishing the robot’s pose &map->odom tf
. - After providing the initial pose of the bot you will see the rviz2 window updating with estimated robot pose from amcl as well as updated global and local costmap. Use the
2D Goal Pose
in rviz2 to provide the bot with a goal pose to start navigation. (shown below in gif)