Skip to content

Commit 5bb8297

Browse files
committed
add pretrained checkpoints, update tiago model files
1 parent 219607c commit 5bb8297

22 files changed

+2117
-4052
lines changed

.dockerignore

-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,5 @@ scripts/wandb/
66
scripts/paper_n1/
77
scripts/paper_n2/
88
webots/
9-
scripts/model_checkpoints/
109
.git/objects
1110
*.npy

Dockerfile

-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ RUN catkin config --blacklist tiago_pcl_tutorial # combined_robot_hw_tests # for
5555
RUN /bin/bash -c ". /opt/ros/melodic/setup.bash && catkin build || exit"
5656

5757
# update the moveit configs with the global joint
58-
COPY gazebo_world/tiago/robot/modified_tiago.srdf.em src/tiago_moveit_config/config/srdf/tiago.srdf.em
5958
COPY gazebo_world/tiago/robot/modified_tiago_pal-gripper.srdf src/tiago_moveit_config/config/srdf/tiago_pal-gripper.srdf
6059
COPY gazebo_world/tiago/robot/modified_gripper.urdf.xacro src/pal_gripper/pal_gripper_description/urdf/gripper.urdf.xacro
6160
COPY gazebo_world/tiago/robot/modified_wsg_gripper.urdf.xacro src/pal_wsg_gripper/pal_wsg_gripper_description/urdf/gripper.urdf.xacro

gazebo_world/tiago/robot/modified_tiago.srdf.em

-3,819
This file was deleted.

gazebo_world/tiago/robot/modified_tiago_pal-gripper.srdf

+5-9
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
<!-- Autogenerated file, don't edit this, edit tiago.srdf.em instead-->
21
<?xml version="1.0" ?>
2+
<!-- =================================================================================== -->
3+
<!-- | This document was autogenerated by xacro from /dev/stdin | -->
4+
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
5+
<!-- =================================================================================== -->
36
<!--This does not replace URDF, and is not an extension of URDF.
47
This is a format for representing semantic information about the robot structure.
58
A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined
69
-->
710
<robot name="tiago">
8-
<!--GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc-->
9-
<!--LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included-->
10-
<!--JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included-->
11-
<!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group-->
12-
<!--SUBGROUPS: Groups can also be formed by referencing to already defined group names-->
1311
<group name="base">
1412
<joint name="world_joint" />
1513
</group>
16-
17-
1814
<group name="arm">
1915
<joint name="arm_1_joint" />
2016
<joint name="arm_2_joint" />
@@ -48,7 +44,7 @@
4844
<group name="base" />
4945
</group>
5046
<!--END EFFECTOR: Purpose: Represent information about an end effector.-->
51-
<end_effector name="gripper" parent_link="arm_tool_link" group="gripper" parent_group="arm_torso" />
47+
<end_effector group="gripper" name="gripper" parent_group="arm_torso" parent_link="arm_tool_link" />
5248

5349
<virtual_joint name="world_joint" type="planar" parent_frame="odom" child_link="base_footprint" />
5450
<!--PASSIVE JOINT: Purpose: this element is used to mark joints that are not actuated-->

gazebo_world/tiago/robot/tiago.urdf.xacro

+3-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<xacro:wrong_wrist_model/>
3838
</xacro:if>
3939
</xacro:if>
40-
<xacro:if value="${end_effector not in ['false', False, 'pal-gripper', 'pal-hey5', 'schunk-wsg', 'robotiq-2f-85', 'robotiq-2f-140', 'custom']}">
40+
<xacro:if value="${end_effector not in ['false', False, 'pal-gripper', 'pal-hey5', 'schunk-wsg', 'robotiq-2f-85', 'robotiq-2f-140', 'robotiq-epick', 'custom', 'no-ee']}">
4141
<xacro:wrong_end_effector/>
4242
</xacro:if>
4343
<xacro:if value="${ft_sensor not in ['false', False, 'schunk-ft']}">
@@ -57,6 +57,7 @@
5757
<xacro:property name="has_arm" value="$(arg arm)"/>
5858
<xacro:property name="has_schunk_ft" value="${ft_sensor == 'schunk-ft'}"/>
5959
<xacro:property name="has_ft_sensor" value="${has_schunk_ft}"/> <!-- This should be OR'ed with other FT sensors-->
60+
<xacro:property name="has_end_effector" value="${end_effector not in ['false', False, 'no-ee']}"/>
6061
<xacro:property name="end_effector_link" value="${'wrist_ft_tool_link' if has_ft_sensor else 'arm_tool_link'}"/>
6162
<xacro:property name="end_effector_name" value="${'hand' if end_effector == 'pal-hey5' else 'gripper'}"/>
6263
<xacro:property name="head_link_name" value="head_2_link"/>
@@ -107,7 +108,7 @@
107108
<xacro:tiago_arm name="arm" parent="torso_lift_link" wrist_model="${wrist_model}" has_ft_sensor="${has_ft_sensor}" reflect="1" tiago_dual="-1" arm_1_offset="${arm_1_joint_offset}" arm_2_offset="${arm_2_joint_offset}" arm_3_offset="${arm_3_joint_offset}" arm_4_offset="${arm_4_joint_offset}" arm_5_offset="${arm_5_joint_offset}" arm_6_offset="${arm_6_joint_offset}" arm_7_offset="${arm_7_joint_offset}" no_safety_eps="${no_safety_eps}">
108109
<origin xyz="0.15505 0.014 -0.151" rpy="0 0 ${-90 * deg_to_rad}" />
109110
</xacro:tiago_arm>
110-
<xacro:tiago_end_effector name="${end_effector_name}" parent="${end_effector_link}" type="${end_effector}" reflect="1"/>
111+
<xacro:tiago_end_effector name="${end_effector_name}" parent="${end_effector_link}" type="${end_effector}" has_end_effector="${has_end_effector}" reflect="1"/>
111112
</xacro:if>
112113

113114
<!-- Force Torque sensor -->

readme.md

+20-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Repository providing the source code for the paper "N2M2: Learning Navigation f
44
Please cite the paper as follows:
55

66
@article{honerkamp2021learning,
7-
title={Learning Navigation for Arbitrary Mobile Manipulation Motions in Unseen and Dynamic Environments},
7+
title={N2M2: Learning Navigation for Arbitrary Mobile Manipulation Motions in Unseen and Dynamic Environments},
88
author={Daniel Honerkamp and Tim Welschehold and Abhinav Valada},
99
journal={arXiv preprint arXiv:2206.08737},
1010
year={2022},
@@ -38,6 +38,14 @@ The following commands also assume that you have docker installed, and to use a
3838

3939
The commands to train and evaluate the models in the paper can be found in `docker_run.sh`.
4040

41+
To run the container interactively, use the following commands:
42+
43+
docker run -it --gpus all --rm dhonerkamp/mobile_rl:11.1-latest bash
44+
cd catkin_ws_[pr2/hsr/tiago]
45+
source devel/setup.bash
46+
conda activate
47+
48+
then proceed to the "Run" section below.
4149

4250
## Evaluating on your own task
4351
Tasks are implemented as environment wrappers in `scripts/modulation/envs/tasks.py`.
@@ -68,8 +76,8 @@ Install moveit and the pr2
6876
sudo apt-get install ros-[version]-pr2-simulator
6977
sudo apt-get install ros-[version]-moveit
7078
sudo apt-get install ros-[version]-moveit-pr2
71-
ros-[version]-pr2-common
72-
ros-[version]-pr2-navigation
79+
ros-melodic-pr2-common
80+
ros-melodic-pr2-navigation
7381

7482
Create a catkin workspace (ideally a separate one for each robot)
7583

@@ -78,7 +86,7 @@ Create a catkin workspace (ideally a separate one for each robot)
7886

7987
Install further ros packages:
8088

81-
yes | rosinstall src /opt/ros/[ros-version] modulation.rosinstall
89+
yes | rosinstall src /opt/ros/melodic modulation.rosinstall
8290

8391
Fork the repo and clone into `./src`
8492

@@ -110,15 +118,21 @@ For more details and how to install the ROS requirements for the other robots pl
110118

111119

112120
### Run
121+
- If you have a weights and biases account, log into the account. Otherwise first run `wandb offline` in your shell, which will turn off logging.
122+
113123
- Training (set workers etc. as needed, this is the command used in the paper):
114124

115125
python src/modulation_rl/scripts/main_ray.py --load_best_defaults --num_gpus 0.24 --num_workers 20
116126
--num_cpus_per_worker 0.1 --num_envs_per_worker 1 --num_gpus_per_worker 0 --ray_verbosity 2
117127
--training_intensity 0.1 --load_best_defaults --vis_env
118128

119-
- Evaluation:
129+
- Evaluation of a pretrained checkpoint (pick one of [pr2/hsr/tiago]):
130+
131+
python src/modulation_rl/scripts/evaluation_ray.py --evaluation_only --eval_execs sim gazebo --env [pr2/hsr/tiago] --model_file=[pr2/hsr/tiago]/checkpoint-1000 --eval_tasks picknplace --vis_env
132+
133+
- Evaluation of a wandb logged run (adjust [pr2/hsr/tiago] and ${wandb_run_id}):
120134

121-
python src/modulation_rl/scripts/evaluation_ray.py --evaluation_only --eval_execs sim gazebo --env pr2 --resume_id ${wandb_run_id} --eval_tasks picknplace --vis_env
135+
python src/modulation_rl/scripts/evaluation_ray.py --evaluation_only --eval_execs sim gazebo --env [pr2/hsr/tiago] --resume_id ${wandb_run_id} --eval_tasks picknplace --vis_env
122136

123137
5. [Only to visualise] start rviz:
124138

32.5 MB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)