jimyoung6709 commited on
Commit
e7b61d1
1 Parent(s): 5e96b6e

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +116 -1
README.md CHANGED
@@ -13,4 +13,119 @@ Neural MP is a machine learning-based motion planning system for robotic manipul
13
 
14
  All Neural MP checkpoints, as well as our [training codebase](https://github.com/mihdalal/neuralmotionplanner) are released under an MIT License.
15
 
16
- For full details, please read [our paper](https://mihdalal.github.io/neuralmotionplanner/) and see [our project page](https://mihdalal.github.io/neuralmotionplanner/).
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  All Neural MP checkpoints, as well as our [training codebase](https://github.com/mihdalal/neuralmotionplanner) are released under an MIT License.
15
 
16
+ For full details, please read our paper(coming soon) and see [our project page](https://mihdalal.github.io/neuralmotionplanner/).
17
+
18
+ ## Model Summary
19
+ - **Developed by:** The Neural MP team consisting of researchers from Carnegie Mellon University.
20
+ - **Language(s) (NLP):** en
21
+ - **License:** MIT
22
+ - **Pretraining Dataset:** Coming soon
23
+ - **Repository:** [https://github.com/mihdalal/neuralmotionplanner](https://github.com/mihdalal/neuralmotionplanner)
24
+ - **Paper:** Coming soon
25
+ - **Project Page & Videos:** [https://mihdalal.github.io/neuralmotionplanner/](https://mihdalal.github.io/neuralmotionplanner/)
26
+
27
+ ## Installation
28
+
29
+ Please check [here](https://github.com/mihdalal/neural_mp?tab=readme-ov-file#installation-instructions) for detailed instructions
30
+
31
+ ## Usage
32
+
33
+ Neural MP model takes in 3D point cloud and start & goal angles of the Franka robot as input, and predict 7-DoF delta joint actions. We provide a wrapper class [NeuralMP](https://github.com/mihdalal/neural_mp/blob/master/neural_mp/real_utils/neural_motion_planner.py) for inference and deploy our model in the real world.
34
+
35
+ Here's an deployment example with the Manimo Franka control library:
36
+
37
+ Note: using Manimo is not required, you may use other Franka control libraries by creating a wrapper class which inherits from FrankaRealEnv (check [franka_real_env.py](https://github.com/mihdalal/neural_mp/blob/master/neural_mp/envs/franka_real_env.py))
38
+
39
+ ```python
40
+ import argparse
41
+ import numpy as np
42
+
43
+ from neural_mp.envs.franka_real_env import FrankaRealEnvManimo
44
+ from neural_mp.real_utils.neural_motion_planner import NeuralMP
45
+
46
+ if __name__ == "__main__":
47
+
48
+ parser = argparse.ArgumentParser()
49
+ parser.add_argument(
50
+ "--mdl_url",
51
+ type=str,
52
+ default="mihdalal/NeuralMP",
53
+ help="hugging face url to load the neural_mp model",
54
+ )
55
+ parser.add_argument(
56
+ "--cache-name",
57
+ type=str,
58
+ default="scene1_single_blcok",
59
+ help="Specify the scene cache file with pcd and rgb data",
60
+ )
61
+ parser.add_argument(
62
+ "--use-cache",
63
+ action="store_true",
64
+ help=("If set, will use pre-stored point clouds"),
65
+ )
66
+ parser.add_argument(
67
+ "--debug-combined-pcd",
68
+ action="store_true",
69
+ help=("If set, will show visualization of the combined pcd"),
70
+ )
71
+ parser.add_argument(
72
+ "--denoise-pcd",
73
+ action="store_true",
74
+ help=("If set, will apply denoising to the pcds"),
75
+ )
76
+ parser.add_argument(
77
+ "--train-mode", action="store_true", help=("If set, will eval with policy in training mode")
78
+ )
79
+ parser.add_argument(
80
+ "--tto", action="store_true", help=("If set, will apply test time optimization")
81
+ )
82
+ parser.add_argument(
83
+ "--in-hand", action="store_true", help=("If set, will enable in hand mode for eval")
84
+ )
85
+ parser.add_argument(
86
+ "--in-hand-params",
87
+ nargs="+",
88
+ type=float,
89
+ default=[0.1, 0.1, 0.1, 0.0, 0.0, 0.1, 0.0, 0.0, 0.0, 1.0],
90
+ help="Specify the bounding box of the in hand object. 10 params in total [size(xyz), pos(xyz), ori(xyzw)] 3+3+4.",
91
+ )
92
+
93
+ args = parser.parse_args()
94
+ env = FrankaRealEnvManimo()
95
+ neural_mp = NeuralMP(
96
+ env=env,
97
+ model_url=args.mdl_url,
98
+ train_mode=args.train_mode,
99
+ in_hand=args.in_hand,
100
+ in_hand_params=args.in_hand_params,
101
+ visualize=True,
102
+ )
103
+
104
+ points, colors = neural_mp.get_scene_pcd(
105
+ use_cache=args.use_cache,
106
+ cache_name=args.cache_name,
107
+ debug_combined_pcd=args.debug_combined_pcd,
108
+ denoise=args.denoise_pcd,
109
+ )
110
+
111
+ # specify start and goal configurations
112
+ start_config = np.array([-0.538, 0.628, -0.061, -1.750, 0.126, 2.418, 1.610])
113
+ goal_config = np.array([1.067, 0.847, -0.591, -1.627, 0.623, 2.295, 2.580])
114
+
115
+ if args.tto:
116
+ trajectory = neural_mp.motion_plan_with_tto(
117
+ start_config=start_config,
118
+ goal_config=goal_config,
119
+ points=points,
120
+ colors=colors,
121
+ )
122
+ else:
123
+ trajectory = neural_mp.motion_plan(
124
+ start_config=start_config,
125
+ goal_config=goal_config,
126
+ points=points,
127
+ colors=colors,
128
+ )
129
+
130
+ success, joint_error = neural_mp.execute_motion_plan(trajectory, speed=0.2)
131
+ ```