... | ... | @@ -24,6 +24,19 @@ After these settings are done and controller is connected into the local network |
|
|
|
|
|
#### Controller program
|
|
|
|
|
|
MAIN program:
|
|
|
|
|
|
```
|
|
|
If M_Run(2)=1 Then GoTo *L1
|
|
|
XLoad 2, "JS"
|
|
|
*L3
|
|
|
If C_Prg(2)<>"JS" Then GoTo *L3
|
|
|
XRun 2
|
|
|
Wait M_Run(2)=1
|
|
|
*L1
|
|
|
End
|
|
|
```
|
|
|
|
|
|
JS program:
|
|
|
|
|
|
```
|
... | ... | @@ -45,9 +58,10 @@ ROS program |
|
|
End
|
|
|
```
|
|
|
|
|
|
MAIN program is used to start joint streamer in the second slot so the joint streamer run in parallel with ROS program.
|
|
|
JS program is used to stream robot position to the computer. ROS program is used to control robot from the computer. Note, that program is empty at the beginning but have to be created manually in order to control robot.
|
|
|
|
|
|
Put the JS program to the first slot using keys Function + EXE on teach-pendant during visiting the "File/Edit" screen. Run program located in the first slot using the "Start" button located on the controller. To verify that joint positions are transmitted successfully, put mitsubishi_controller package into your ROS workspace, complie and run: "rosrun mitsubishi_controller mitsubishi_joint_state". You should see "Connected to 192.168.0.20:10004" in your terminal. Furthermore, on topic "/jointstate" you should see the current position of the robot in joint coordinates in radians ("rostopic echo /joint_states").
|
|
|
Put the MAIN program to the first slot using keys Function + EXE on teach-pendant during visiting the "File/Edit" screen. Run program located in the first slot using the "Start" button located on the controller. To verify that joint positions are transmitted successfully, put mitsubishi_controller package into your ROS workspace, complie and run: "rosrun mitsubishi_controller mitsubishi_joint_state". You should see "Connected to 192.168.0.20:10004" in your terminal. Furthermore, on topic "/jointstate" you should see the current position of the robot in joint coordinates in radians ("rostopic echo /joint_states").
|
|
|
|
|
|
### PC settings
|
|
|
|
... | ... | |