Skip to content

Commit 0b61aa9

Browse files
garethellis0RobynCastro
authored andcommitted
Rover 2018 Model (#369)
* Created the Initial Rover With Some Broken Physics * Updated Gazebo Resource Paths In Setup Scripts' * Moved Files Around To Make Gazebo Happy * Moved Rover To Models Folder * Fixed Inertia Matrices So The Robot No Longer Explodes * Moved Robots to robots FOlder * Changed Robot Paths In .xacro Files * Revamped Gazebo Launch File System * Removed unused launch file * Added some more dependecies to sb_gazebo package.xml * Added basic controllers for rover_2018 * Updating Rover Model To Be Xacro compatible * Added launch file for basic rover course' * Refactored Launch Files So load_robot.launch is more standalone * Moved world_path construction to load_world.launch * Very basic rover model * Revised Rover Model To Use Relative Positions * Added Tower And Camera To Rover 2018 Model * Switched x and y in rover_2018 model * Added Stereo Camera To rover_2018 * Removed Unused Sections of rover_2018_control.yaml * Addressed PR comments (mostly documentation) * Updated travis script to properly fail on non-zero exit codes * Fixed sb_gazebo package.xml
1 parent 5133423 commit 0b61aa9

26 files changed

+3417
-78
lines changed

setup_scripts/install_tools.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ declare -a new_shell_config_lines=(
3030
# plugins, and resources. Make sure to preserve the path that already exists as well
3131
"export GAZEBO_MODEL_PATH=$DIR/../src/sb_gazebo/models:${GAZEBO_MODEL_PATH}"\
3232
"export GAZEBO_PLUGIN_PATH=$DIR/../src/sb_gazebo/lib:${GAZEBO_PLUGIN_PATH}"\
33-
"export GAZEBO_RESOURCE_PATH=$DIR/../src/sb_gazebo/models:${GAZEBO_RESOURCE_PATH}"\
33+
"export GAZEBO_RESOURCE_PATH=$DIR/../src/sb_gazebo/models:/usr/share/gazebo:/usr/share/gazebo-9:${GAZEBO_RESOURCE_PATH}"\
3434
# Aliases to make development easier
3535
"alias clion=\"clion & disown && exit\""\
3636
"alias rviz=\"rviz & disown && exit\""\
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
robot:
2+
# Publish all joint states
3+
joint_state_controller:
4+
type: joint_state_controller/JointStateController
5+
publish_rate: 50

src/sb_gazebo/launch/elsax_control.launch

-5
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,6 @@
1313
right_centre_wheel_controller"
1414
/>
1515

16-
17-
<include file="$(find sb_gazebo)/launch/general_robot_control.launch">
18-
<arg name="robot" value="elsax"/>
19-
</include>
20-
2116
<!-- This is for jfrost's depthcamera/kinect/zed plugin -->
2217
<node name="zed_transform" pkg="sb_pointcloud_processing" type="pcl_transform" output="screen">
2318
<rosparam param="output_frame"> "zed_pointcloud" </rosparam>

src/sb_gazebo/launch/general_robot_control.launch

-18
This file was deleted.

src/sb_gazebo/launch/igvc_qualification.launch

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
<!-- Runs a rough approximation of the IGVC Basic Course in Gazebo -->
44

55
<!-- Start the world -->
6-
<include file="$(find sb_gazebo)/launch/open_world.launch">
7-
<arg name="world" value="igvc_qualification.world"/>
6+
<include file="$(find sb_gazebo)/launch/load_world_and_robot.launch">
7+
<arg name="world_name" value="igvc_qualification.world"/>
88
<arg name="x_start_coordinate" value="0"/>
99
<arg name="y_start_coordinate" value="-12"/>
1010
<arg name="initial_rotation" value="1.5707"/>
11-
<arg name="robot" value="elsax"/>
11+
<arg name="robot_name" value="elsax"/>
1212
</include>
1313

1414
</launch>
+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<!--
2+
This file launches a robot and it's associated controller
3+
-->
4+
<launch>
5+
<!--
6+
The name of the robot to load, this will be used to construct filepaths
7+
for the files defining the robot
8+
-->
9+
<arg name="robot_name"/>
10+
11+
<!--
12+
The initial position and rotation to spawn the robot at
13+
-->
14+
<arg name="x_start_coordinate" default="0"/>
15+
<arg name="y_start_coordinate" default="0"/>
16+
<arg name="initial_rotation" default="0"/>
17+
18+
<!-- Setup controllers for robot -->
19+
<include file="$(find sb_gazebo)/launch/$(arg robot_name)_control.launch"/>
20+
21+
<!--
22+
- Convert the xacro representation of the robot to xml
23+
- Load the xml representation of the robot to the paramater server
24+
-->
25+
<param name="robot_description"
26+
command="
27+
$(find xacro)/xacro --inorder
28+
'$(find sb_gazebo)/robots/$(arg robot_name).xacro'
29+
"/>
30+
31+
<!-- Push robot_description to factory and spawn robot in gazebo -->
32+
<node name="robot_spawn" pkg="gazebo_ros" type="spawn_model" output="screen"
33+
args="
34+
-urdf -param robot_description
35+
-model $(arg robot_name)
36+
-x $(arg x_start_coordinate)
37+
-y $(arg y_start_coordinate)
38+
-Y $(arg initial_rotation)
39+
"/>
40+
41+
</launch>
+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<launch>
2+
3+
<!-- Path to the folder containing the world that we want to launch -->
4+
<arg name="world_name"/>
5+
6+
<!-- Start up the world -->
7+
<include file="$(find sb_gazebo)/launch/gazebo_open_world.launch">
8+
<arg name="world_name" value="$(find sb_gazebo)/worlds/$(arg world_name)"/>
9+
<arg name="gui" value="true"/>
10+
<!-- Remap the tf topic to another topic, so that we can test out things
11+
that create tf's, like robot_pose_ekf -->
12+
<arg name="tf_topic" value="gazebo_tf"/>
13+
</include>
14+
15+
</launch>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<launch>
2+
3+
<!--
4+
Opens a give world from "sb_gazebo/worlds" and
5+
places a robot with a given name with ".xacro" and ".gazebo" files
6+
in "sb_gazebo/robots" in it at a given x,y and with a given rotation
7+
-->
8+
9+
<arg name="world_name"/>
10+
<arg name="x_start_coordinate"/>
11+
<arg name="y_start_coordinate"/>
12+
<arg name="initial_rotation"/>
13+
<arg name="robot_name"/>
14+
15+
<!-- Start up the world -->
16+
<include file="$(find sb_gazebo)/launch/load_world.launch">
17+
<arg name="world_name" value="$(arg world_name)"/>
18+
</include>
19+
20+
<!-- Load the robot -->
21+
<include file="$(find sb_gazebo)/launch/load_robot.launch">
22+
<arg name="x_start_coordinate" value="$(arg x_start_coordinate)"/>
23+
<arg name="y_start_coordinate" value="$(arg y_start_coordinate)"/>
24+
<arg name="initial_rotation" value="$(arg initial_rotation)"/>
25+
<arg name="robot_name" value="$(arg robot_name)"/>
26+
</include>
27+
28+
</launch>

src/sb_gazebo/launch/open_world.launch

-38
This file was deleted.
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<launch>
2+
3+
<!-- Load joint controller configurations from YAML file to parameter server -->
4+
<rosparam file="$(find sb_gazebo)/config/rover_2018_control.yaml" command="load"/>
5+
6+
<!-- load the controllers -->
7+
<node name="controller_spawner"
8+
pkg="controller_manager"
9+
type="spawner" respawn="false"
10+
output="screen" ns="/robot"
11+
args="joint_state_controller
12+
left_centre_wheel_controller
13+
right_centre_wheel_controller"
14+
/>
15+
16+
17+
<include file="$(find sb_gazebo)/launch/general_robot_control.launch">
18+
<arg name="robot" value="rover_2018"/>
19+
</include>
20+
21+
</launch>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<launch>
2+
3+
<!-- Load joint controller configurations from YAML file to parameter server -->
4+
<rosparam file="$(find sb_gazebo)/config/rover_2018_control.yaml" command="load"/>
5+
6+
<!-- load the controllers -->
7+
<node name="controller_spawner"
8+
pkg="controller_manager"
9+
type="spawner" respawn="false"
10+
output="screen" ns="/"
11+
args="
12+
joint_state_controller
13+
"
14+
/>
15+
16+
</launch>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<launch>
2+
3+
<!-- Runs a rough approximation of the IGVC Basic Course in Gazebo -->
4+
5+
<!-- Start the world -->
6+
<include file="$(find sb_gazebo)/launch/load_world_and_robot.launch">
7+
<arg name="world_name" value="empty.world"/>
8+
<arg name="x_start_coordinate" value="0"/>
9+
<arg name="y_start_coordinate" value="0"/>
10+
<arg name="initial_rotation" value="0"/>
11+
<arg name="robot_name" value="rover_2018"/>
12+
</include>
13+
14+
</launch>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" ?>
2+
<model>
3+
<name>rover_2018</name>
4+
<version>1.0</version>
5+
<sdf version="1.6">model.sdf</sdf>
6+
<author>
7+
<name></name>
8+
<email></email>
9+
</author>
10+
<description></description>
11+
</model>

0 commit comments

Comments
 (0)