roboclone scene and launch for single rl enviroment

This commit is contained in:
Ilya Uraev 2024-04-18 15:50:47 +03:00
parent d3a8f9b9c6
commit 44b927f9a9
3 changed files with 289 additions and 7 deletions

View file

@ -15,6 +15,8 @@ import xacro
import os
from ament_index_python.packages import get_package_share_directory
from rbs_arm import RbsBuilder
def launch_setup(context, *args, **kwargs):
# Initialize Arguments
robot_type = LaunchConfiguration("robot_type")
@ -62,10 +64,19 @@ def launch_setup(context, *args, **kwargs):
"namespace": namespace,
"x": x_pos.perform(context),
"y": y_pos.perform(context),
"z": z_pos.perform(context)
"z": z_pos.perform(context),
"roll": roll.perform(context),
"pitch": pitch.perform(context),
"yaw": yaw.perform(context)
#TODO: add rotation and add probably via dict
}
)
# robot = RbsBuilder(6, "arm0", "world", "rbs_gripper")
# robot.base()
# robot.gripper()
# robot.ros2_control()
# robot.moveit()
robot_description_content = robot_description_doc.toprettyxml(indent=" ")
robot_description = {"robot_description": robot_description_content}
@ -381,6 +392,21 @@ def generate_launch_description():
default_value="0.0",
description="Position of robot in world by Z")
)
declared_arguments.append(
DeclareLaunchArgument("roll",
default_value="0.0",
description="Position of robot in world by Z")
)
declared_arguments.append(
DeclareLaunchArgument("pitch",
default_value="0.0",
description="Position of robot in world by Z")
)
declared_arguments.append(
DeclareLaunchArgument("yaw",
default_value="0.0",
description="Position of robot in world by Z")
)
return LaunchDescription(declared_arguments + [OpaqueFunction(function=launch_setup)])