This commit is contained in:
Björn Ellensohn 2023-07-28 11:42:20 +02:00
parent ea164a3acb
commit 85a44c4290
2 changed files with 32 additions and 88 deletions

View File

@ -178,6 +178,38 @@
</joint> </joint>
<link name="caster_wheel">
<visual>
<geometry>
<sphere radius="${caster_wheel_radius}"/>
</geometry>
<material name="white"/>
</visual>
<collision>
<geometry>
<sphere radius="${caster_wheel_radius}"/>
</geometry>
</collision>
<xacro:inertial_sphere mass="${caster_wheel_mass}" radius="${caster_wheel_radius}">
<origin xyz="0 0 0" rpy="0 0 0"/>
</xacro:inertial_sphere>
</link>
<gazebo reference="caster_wheel">
<material>Gazebo/White</material>
<mu1 value="0.001"/>
<mu2 value="0.001"/>
</gazebo>
<!-- Lidar LINK -->
<joint name="lidar_joint" type="fixed">
<parent link="chassis"/>
<child link="laser_frame"/>
<origin xyz="-150 0 30"/>
</joint>
<link name="caster_wheel"> <link name="caster_wheel">
<visual> <visual>
<geometry> <geometry>

View File

@ -43,93 +43,5 @@ def generate_launch_description():
description='Use sim time if true'), description='Use sim time if true'),
joy_node, joy_node,
teleop_node, teleop_node,
])
def generate_launch_description():
robot_description_content = Command(
[
PathJoinSubstitution([FindExecutable(name="xacro")]),
" ",
PathJoinSubstitution(
[
FindPackageShare("bot_mini_description"),
"urdf",
"odrive_diffbot.urdf.xacro"
]
),
]
)
robot_description = {"robot_description": ParameterValue(robot_description_content, value_type=str)}
robot_controllers = PathJoinSubstitution(
[
FindPackageShare("bot_mini_bringup"),
"config",
"diffbot_controllers.yaml",
]
)
control_node = Node(
package="controller_manager",
executable="ros2_control_node",
parameters=[robot_description, robot_controllers],
output="both",
)
robot_state_pub_node = Node(
package="robot_state_publisher",
executable="robot_state_publisher",
output="both",
parameters=[robot_description],
)
joint_state_broadcaster_spawner = Node(
package="controller_manager",
executable="spawner",
arguments=["joint_state_broadcaster", "-c", "/controller_manager"],
)
robot_controller_spawner = Node(
package="controller_manager",
executable="spawner",
arguments=["diffbot_base_controller", "-c", "/controller_manager"],
)
joystick_spawner = Node(
package="joy",
executable="joy_node"
)
teleop_spawner = Node(
package="rmp220_teleop",
executable="rmp220_teleop",
remappings=[('/diffbot_base_controller/cmd_vel_unstamped','/cmd_vel_joy')]
)
cam_node = Node(
package="ros2_cam_openCV",
executable="cam_node"
)
lidar_dir = os.path.join(get_package_share_directory('lslidar_driver'), 'params', 'lsx10.yaml')
lidar_node = LifecycleNode(
package='lslidar_driver',
executable='lslidar_driver_node',
name='lslidar_driver_node',
output='screen',
emulate_tty=True,
namespace='',
parameters=[lidar_dir],
)
twist_mux_params = os.path.join(get_package_share_directory('bot_mini_bringup'),'config','twist_mux.yaml')
twist_mux = Node(
package="twist_mux",
executable="twist_mux",
parameters=[twist_mux_params, {'use_sim_time': False}],
remappings=[('/cmd_vel_out','/diffbot_base_controller/cmd_vel_unstamped')]
)
return LaunchDescription([
twist_mux twist_mux
]) ])