Commit 85560838 authored by Jayant Khatkar's avatar Jayant Khatkar
Browse files

dry run working

parent adfe9006
...@@ -4,7 +4,7 @@ Take a standard gcode file and print it using only 1 arm. ...@@ -4,7 +4,7 @@ Take a standard gcode file and print it using only 1 arm.
Includes the following important components: Includes the following important components:
- connecting with single arm through ros - connecting with single arm through ros
- calibration: todo - calibration: done
- connecting with extruder through ros: todo - connecting with extruder through ros: todo
- printing the whole thing: todo - printing the whole thing: todo
...@@ -45,10 +45,10 @@ launch ur5_e_moveit_config ur5_e_moveit_planning_execution.launch ...@@ -45,10 +45,10 @@ launch ur5_e_moveit_config ur5_e_moveit_planning_execution.launch
roslaunch ur5_e_moveit_config moveit_rviz.launch config:=true roslaunch ur5_e_moveit_config moveit_rviz.launch config:=true
``` ```
3. Run the controller file. 3. Run the main code.
```bash ```bash
ipython -i controller.py ipython -i main.py
``` ```
#### How to Run in Simulation #### How to Run in Simulation
...@@ -57,6 +57,11 @@ ipython -i controller.py ...@@ -57,6 +57,11 @@ ipython -i controller.py
```bash ```bash
# Launch simulated ur5e with moveit and visualisation # Launch simulated ur5e with moveit and visualisation
# TODO: change topic names of simulated to be same as real
launch ur5_e_moveit_config ur5_e_moveit_planning_execution.launch launch ur5_e_moveit_config ur5_e_moveit_planning_execution.launch
``` ```
2. Run the main code.
```bash
ipython -i main.py
```
...@@ -22,13 +22,8 @@ if __name__ == "__main__": ...@@ -22,13 +22,8 @@ if __name__ == "__main__":
# Calibrate system # Calibrate system
con.calibrate(CalibrationType.centre) con.calibrate(CalibrationType.centre)
# convert (a) contour to arm trajectory # Plan and execute (planning is slow because ik calculation rosservice used)
traj = con.contour2traj(contours[0]) for i in range(10): #only do first 10 contours
t = con.contour2traj(contours[i])
# Execute trajectory con.move_to_next_contour(t)
con.move_to(traj.points[0].positions) con.exec_traj(t)
con.exec_traj(traj)
# move to next trajectory
t2 = con.contour2traj(contours[98])
con.move_to_next_contour(t2)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment