From 1dca8455adff6b2470556a76b9ce810c07b444d7 Mon Sep 17 00:00:00 2001 From: Kevin Nickels Date: Wed, 23 Dec 2020 17:24:57 -0600 Subject: [PATCH] Add navigation of simulated curio --- README.md | 2 +- SIMULATION.md | 37 +++++++ curio_description/urdf/curio_laser.xacro | 4 +- curio_gazebo/launch/curio_shapes_world.launch | 26 +++++ curio_gazebo/worlds/shapes.world | 101 ++++++++++++++++++ .../launch/curio_navigation.launch | 25 +++++ 6 files changed, 192 insertions(+), 3 deletions(-) create mode 100644 SIMULATION.md create mode 100644 curio_gazebo/launch/curio_shapes_world.launch create mode 100644 curio_gazebo/worlds/shapes.world create mode 100644 curio_navigation/launch/curio_navigation.launch diff --git a/README.md b/README.md index dc2d1a2..f8a0865 100644 --- a/README.md +++ b/README.md @@ -494,7 +494,7 @@ This package contains launch and [`rviz`](http://wiki.ros.org/rviz) configuratio To view the rover in [`rviz`](http://wiki.ros.org/rviz) and manually control the joints run: ```bash -roslaunch curio_view view_model.launch +roslaunch curio_viz view_model.launch ``` ![Rviz View Model](https://github.com/srmainwaring/curio/wiki/images/curio_viz_view_model_rviz.jpg) diff --git a/SIMULATION.md b/SIMULATION.md new file mode 100644 index 0000000..72ddd29 --- /dev/null +++ b/SIMULATION.md @@ -0,0 +1,37 @@ +In order to start up the simulation: +``` +roslaunch mybot_gazebo mybot_world.launch +roslaunch roslaunch curio_viz view_model.launch +``` + +Send a base controller command and ensure that the robot moves in both Gazebo and rviz: +``` +rostopic pub /cmd_vel geometry_msgs/Twist "linear: + x: 0.2 + y: 0.0 + z: 0.0 +angular: + x: 0.0 + y: 0.0 + z: 0.1" +``` + +To make a map: +Terminal A: +A$: roslaunch curio_gazebo curio_shapes_world.launch +will start up gazebo and rqt_robot_steering +Terminal B: +B$: ± roslaunch curio_viz view_robot.launch +Terminal B: +C$: ± rosrun gmapping slam_gmapping scan:=sensors/laser +Gazebo: + Don't forget to hit 'play' before you move the robot around. + +Driver the robot around, making a map as seen in rviz. When you are happy with the map: + rosrun map_server map_saver -f + + + +Trying to mirror https://emanual.robotis.com/docs/en/platform/turtlebot3/navigation/#navigation + +roslaunch curio_navigation curio_navigation.launch map_file:=$HOME/curio_shapes_map.yaml diff --git a/curio_description/urdf/curio_laser.xacro b/curio_description/urdf/curio_laser.xacro index 2a1c12e..de04c84 100644 --- a/curio_description/urdf/curio_laser.xacro +++ b/curio_description/urdf/curio_laser.xacro @@ -64,7 +64,7 @@ true 5 - true + false sensors/laser 0 0 0.045 0 0 0 @@ -112,4 +112,4 @@ true - \ No newline at end of file + diff --git a/curio_gazebo/launch/curio_shapes_world.launch b/curio_gazebo/launch/curio_shapes_world.launch new file mode 100644 index 0000000..1854873 --- /dev/null +++ b/curio_gazebo/launch/curio_shapes_world.launch @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/curio_gazebo/worlds/shapes.world b/curio_gazebo/worlds/shapes.world new file mode 100644 index 0000000..924e77e --- /dev/null +++ b/curio_gazebo/worlds/shapes.world @@ -0,0 +1,101 @@ + + + + + model://ground_plane + + + model://sun + + + 5 0 0.5 0 0 0 + + + + + 1 1 1 + + + + + + + 1 1 1 + + + + + + + + + + 0 6.5 0.5 0 0 0 + + + + + 0.5 + + + + + + + 0.5 + + + + + + + + + + -5 -1.5 0.5 0 1.5707 0 + + + + + 0.5 + 1.0 + + + + + + + 0.5 + 1.0 + + + + + + + + + + -5 5 0.5 0 0 0 + + + + + 1 2 3 + + + + + + + 1 2 3 + + + + + + + + + + diff --git a/curio_navigation/launch/curio_navigation.launch b/curio_navigation/launch/curio_navigation.launch new file mode 100644 index 0000000..71c50c2 --- /dev/null +++ b/curio_navigation/launch/curio_navigation.launch @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + +