-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from adarshmalapaka/master
Merging phase 2 development with the master branch of the source repository
- Loading branch information
Showing
133 changed files
with
55,568 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# VS Code files | ||
*.VC.db* | ||
|
||
# OS X files | ||
.DS_Store | ||
|
||
# Build artifacts | ||
build/ | ||
|
||
# Log artifacts | ||
log/ | ||
|
||
# Install artifacts | ||
install/ | ||
|
||
# clangd and compile_commands | ||
.clangd/ | ||
compile_commands.json | ||
|
||
# Python | ||
*.pyc | ||
|
||
# Temporary Files | ||
*~ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import os | ||
import random | ||
|
||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
from ament_index_python.packages import get_package_share_directory | ||
|
||
def generate_random_bins(num_bins): | ||
|
||
x_bins = random.sample(range(0, 2), num_bins) | ||
y_bins = random.sample(range(1, 7), num_bins) | ||
|
||
return x_bins, y_bins | ||
|
||
def gen_node(idx, xpos, ypos): | ||
model = os.path.join(get_package_share_directory('mario_com'), | ||
'models') | ||
|
||
return Node( | ||
package='gazebo_ros', | ||
executable='spawn_entity.py', | ||
arguments=['-entity', 'trash_bin{}'.format(idx), | ||
'-file', model + '/bin_cylinder/model.sdf', | ||
'-x', str(xpos), | ||
'-y', str(ypos), | ||
'-z', '0.0', | ||
'-Y', '0.0'], | ||
output='screen') | ||
|
||
def generate_launch_description(): | ||
|
||
num_bins = 1 | ||
x_bins, y_bins = generate_random_bins(num_bins) | ||
nodes = [] | ||
for i in range(num_bins): | ||
nodes.append(gen_node(i+1, x_bins[i], y_bins[i])) | ||
|
||
model = os.path.join(get_package_share_directory('mario_com'), | ||
'models') | ||
|
||
return LaunchDescription([ | ||
nodes[0], | ||
]) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import os | ||
|
||
from launch import LaunchDescription | ||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription | ||
from launch.conditions import IfCondition, UnlessCondition | ||
from launch.launch_description_sources import PythonLaunchDescriptionSource | ||
from launch.substitutions import Command, LaunchConfiguration, PythonExpression | ||
from launch_ros.actions import Node | ||
from launch_ros.substitutions import FindPackageShare | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch.actions import ExecuteProcess, SetEnvironmentVariable | ||
from launch.substitutions import EnvironmentVariable | ||
|
||
def generate_launch_description(): | ||
|
||
use_sim_time = LaunchConfiguration('use_sim_time', default='true') | ||
|
||
world = os.path.join(get_package_share_directory('mario_com'), | ||
'worlds', 'small_hospital.world') | ||
|
||
model = os.path.join(get_package_share_directory('mario_com'), | ||
'models') | ||
|
||
map = os.path.join(get_package_share_directory('mario_com'), | ||
'maps', 'hospitalmap.yaml') | ||
print(map) | ||
launch_file_dir = os.path.join(get_package_share_directory('mario_com'), 'launch') | ||
pkg_gazebo_ros = get_package_share_directory('gazebo_ros') | ||
tb3_man_bgp = get_package_share_directory('turtlebot3_manipulation_bringup') | ||
nav2_man = get_package_share_directory('turtlebot3_manipulation_navigation2') | ||
|
||
included_launch = IncludeLaunchDescription(PythonLaunchDescriptionSource([ | ||
tb3_man_bgp + '/launch/gazebo.launch.py']), | ||
launch_arguments={'world': world, 'x_pose': '0.0', 'y_pose': '0.0'}.items()) | ||
|
||
bins_launch = IncludeLaunchDescription(PythonLaunchDescriptionSource([ | ||
launch_file_dir, '/bins.launch.py'])) | ||
|
||
nav_launch = IncludeLaunchDescription(PythonLaunchDescriptionSource([ | ||
nav2_man + '/launch/navigation2.launch.py']), | ||
launch_arguments={'map_yaml_file': map, 'start_rviz': 'True', 'params_file': nav2_man+'/param/turtlebot3_use_sim_time.yaml'}.items()) | ||
|
||
initial_pose_pub = ExecuteProcess( | ||
cmd=[ | ||
'ros2', 'topic pub -1', '/initialpose', 'geometry_msgs/PoseWithCovarianceStamped', '"{ header: {stamp: {sec: 0, nanosec: 0}, frame_id: "map"}, pose: { pose: {position: {x: 0.0, y: 0.0, z: 0.0}, orientation: {x: 0.0, y: 0.0, z: 0.0, w: 1.0}}, } }"' | ||
], | ||
shell=True | ||
) | ||
|
||
return LaunchDescription([ | ||
included_launch, | ||
bins_launch, | ||
nav_launch, | ||
initial_pose_pub, | ||
]) | ||
|
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
image: /home/adarsh/hospitalmap.pgm | ||
mode: trinary | ||
resolution: 0.05 | ||
origin: [-1.32, -3.94, 0] | ||
negate: 0 | ||
occupied_thresh: 0.65 | ||
free_thresh: 0.25 |
13 changes: 13 additions & 0 deletions
13
mario_com/models/AnesthesiaMachine/meshes/AnesthesiaMachine.mtl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Blender MTL File: 'AnesthesiaMachine.blend' | ||
# Material Count: 1 | ||
|
||
newmtl AnesthesiaMachine | ||
Ns 79.719386 | ||
Ka 1.000000 1.000000 1.000000 | ||
Kd 0.800000 0.800000 0.800000 | ||
Ks 0.315476 0.315476 0.315476 | ||
Ke 0.000000 0.000000 0.000000 | ||
Ni 1.450000 | ||
d 1.000000 | ||
illum 2 | ||
map_Kd AnesthesiaMachine.png |
Oops, something went wrong.