Skip to content

Commit 1fe4a75

Browse files
authored
Use mobile_manipulator launch file with real robots.
* Update joystick launch configuration and install additional packages Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> * Update launch configurations and dependencies for improved robot control Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl> --------- Signed-off-by: Max Waterhout <max.waterhout@hotmail.nl>
1 parent 11cbe3b commit 1fe4a75

File tree

6 files changed

+17
-9
lines changed

6 files changed

+17
-9
lines changed

.devcontainer/docker-compose.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ services:
1313
tty: true
1414
env_file:
1515
- .env
16+
group_add:
17+
- "106"
1618
volumes:
1719
- "/tmp/.X11-unix:/tmp/.X11-unix"
1820
- "${HOME}/.vscode-server:/home/rcdt/.vscode-server"

ros2_ws/src/rcdt_franka/launch/controllers.launch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def launch_setup(context: LaunchContext) -> list:
5454
name="fr3_gripper",
5555
parameters=[
5656
{
57-
"robot_ip": "172.16.0.2",
57+
"robot_ip": "10.15.20.4",
5858
"joint_names": ["fr3_finger_joint1", "fr3_finger_joint2"],
5959
},
6060
gripper_config,

ros2_ws/src/rcdt_franka/launch/core.launch.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ def launch_setup(context: LaunchContext) -> list:
8585
return [
8686
SetParameter(name="use_sim_time", value=use_sim),
8787
Register.on_start(robot_state_publisher, context),
88-
Register.group(robot, context) if not is_mobile_manipulator else SKIP,
88+
Register.group(robot, context)
89+
if not is_mobile_manipulator or not use_sim
90+
else SKIP,
8991
Register.on_log(static_transform_publisher, "publishing transform", context)
9092
if not is_mobile_manipulator
9193
else SKIP,

ros2_ws/src/rcdt_franka/urdf/franka.urdf.xacro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ SPDX-License-Identifier: Apache-2.0
1818
arm_id="fr3"
1919
ee_id="franka_hand"
2020
ros2_control="true"
21-
robot_ip="172.16.0.2"
21+
robot_ip="10.15.20.4"
2222
joint_limits="${xacro.load_yaml('$(find franka_description)/robots/fr3/joint_limits.yaml')}"
2323
inertials="${xacro.load_yaml('$(find franka_description)/robots/fr3/inertials.yaml')}"
2424
kinematics="${xacro.load_yaml('$(find franka_description)/robots/fr3/kinematics.yaml')}"

ros2_ws/src/rcdt_mobile_manipulator/launch/core.launch.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
from launch import LaunchContext, LaunchDescription
66
from launch.actions import OpaqueFunction
77
from launch_ros.actions import Node, SetParameter
8-
from rcdt_utilities.launch_utils import LaunchArgument, get_file_path
8+
from rcdt_utilities.launch_utils import SKIP, LaunchArgument, get_file_path
99
from rcdt_utilities.register import Register, RegisteredLaunchDescription
1010

1111
use_sim_arg = LaunchArgument("simulation", True, [True, False])
@@ -30,12 +30,15 @@ def launch_setup(context: LaunchContext) -> list:
3030

3131
franka_core = RegisteredLaunchDescription(
3232
get_file_path("rcdt_franka", ["launch"], "core.launch.py"),
33-
launch_arguments={"parent": "panther"},
33+
launch_arguments={"parent": "panther", "simulation": str(use_sim)},
3434
)
3535

3636
panther_core = RegisteredLaunchDescription(
3737
get_file_path("rcdt_panther", ["launch"], "core.launch.py"),
38-
launch_arguments={"child": "franka"},
38+
launch_arguments={
39+
"child": "franka",
40+
"simulation": str(use_sim),
41+
},
3942
)
4043

4144
robots = [
@@ -74,7 +77,7 @@ def launch_setup(context: LaunchContext) -> list:
7477
SetParameter(name="use_sim_time", value=use_sim),
7578
Register.group(franka_core, context),
7679
Register.group(panther_core, context),
77-
Register.group(robot, context),
80+
Register.group(robot, context) if use_sim else SKIP,
7881
Register.on_log(static_transform_publisher, "publishing transform", context),
7982
]
8083

ros2_ws/src/rcdt_mobile_manipulator/launch/mobile_manipulator.launch.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def launch_setup(context: LaunchContext) -> list:
3939

4040
franka_controllers = RegisteredLaunchDescription(
4141
get_file_path("rcdt_franka", ["launch"], "controllers.launch.py"),
42+
launch_arguments={"simulation": str(use_sim)},
4243
)
4344

4445
panther_controllers = RegisteredLaunchDescription(
@@ -80,10 +81,10 @@ def launch_setup(context: LaunchContext) -> list:
8081
)
8182

8283
return [
83-
SetParameter(name="use_sim_time", value=True),
84+
SetParameter(name="use_sim_time", value=use_sim),
8485
Register.group(core, context),
8586
Register.group(franka_controllers, context),
86-
Register.group(panther_controllers, context),
87+
Register.group(panther_controllers, context) if use_sim else SKIP,
8788
Register.group(gripper_services, context),
8889
Register.group(moveit, context),
8990
Register.group(joystick, context),

0 commit comments

Comments
 (0)