Skip to content

Commit cbfa6ea

Browse files
author
nakamichi_d
committed
1.0.0
0 parents  commit cbfa6ea

File tree

259 files changed

+33141
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

259 files changed

+33141
-0
lines changed

README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# khi_robot Package
2+
3+
This repository provides ROS support for KHI robots.
4+
ROS distribution `Kinetic` is supported.
5+
6+
## How to Launch
7+
8+
### 1. Launch Control Node
9+
10+
Start khi_robot_control as:
11+
12+
```
13+
roslaunch khi_robot_bringup ***_bringup.launch ip:=***
14+
```
15+
16+
If you only want to view robot(not control), specify the argument 'viewer' to use viewer mode:
17+
18+
```
19+
roslaunch khi_robot_bringup ***_bringup.launch ip:=*** viewer:=true
20+
```
21+
22+
If you have no real robot, specify the argument 'simulation' to use loopback mode:
23+
24+
```
25+
roslaunch khi_robot_bringup ***_bringup.launch simulation:=true
26+
```
27+
28+
If you want to use gazebo simulation:
29+
30+
```
31+
roslaunch ***_gazebo ***_world.launch
32+
```
33+
34+
### 2. Launch MoveIt! Node
35+
36+
Start a MoveIt! script as:
37+
38+
```
39+
roslaunch ***_moveit_config ***_moveit.launch
40+
```
41+
42+
Now you can see the rviz screen of MoveIt! and interact the robot with the GUI.
43+
44+
## Connecting Real Robot
45+
46+
Refer to `docs/ConnectingRealRobot.md`
47+
48+
## Supported Robot
49+
50+
* duaro (currently simulation only)
51+
* rs007l
52+
* rs007n
53+
* rs80n
54+
55+
## Notes
56+
57+
### About this software
58+
59+
This software is experimental code. There are known issues and missing functionality.
60+
The APIs are completely unstable and likely to change. Use in production systems is not recommended.
61+
62+
### Coordinate
63+
64+
KHI coordinate and ROS cordinate are different.
65+
66+
```
67+
Origin of KHI coordinate is Robot Link1 origin.
68+
69+
Origin of ROS coordinate is World origin.
70+
```

docs/ConnectingRealRobot.md

+237
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,237 @@
1+
# 1. Supported AS system
2+
3+
## F Series
4+
5+
Handling: Higher than ASF_01000000W
6+
7+
## OpenAS Series
8+
9+
Handling: Higher than ASE401010XX3S
10+
11+
# 2. How to operate on real robot
12+
13+
## 2-1. Preparation
14+
15+
Make sure that the robot controller used for real-time control satisfies the following conditions.
16+
17+
* The controller is connected with a robot and ready to operate.
18+
* Nobody is inside the safety fence.
19+
* The controller is in [REPEAT] mode.
20+
* TEACH LOCK on the Teach pendant is switched to OFF.
21+
* Robot is not on Hold status.
22+
* No error.
23+
* The controller is connected to an Ubuntu PC with Ethernet cable and both are within the same network subnet.
24+
25+
## 2-2. Start real-time control
26+
27+
Execute the following command on the ROS running PC to start the real-time control at an administrate level of root.
28+
29+
(e.g.)RS007N:
30+
```
31+
roslaunch khi_robot_bringup rs007n_bringup.launch ip:=[Controller’s IP address]
32+
```
33+
34+
When the real-time control process is started, all axes of the robot moves to 0 positions. (Figure 4)
35+
36+
When the real-time control process is ready to go, the following messages will be displayed by the process.
37+
```
38+
[KhiRobotKrnxDriver] State 0: ACTIVATING -> ACTIVE
39+
```
40+
41+
Once the above messages is confirmed, you are able to start real-time control of the robot from the operation interface of “rviz” or the python’s MoveIt! Commander.
42+
During the real-time control, the display on the Teach pendant will show the figure below.
43+
44+
![START Display on TP](start-display-on-tp.png)]
45+
46+
## 2-3. Terminate the real-time control
47+
48+
Press “Ctrl+C” to end the real-time control.
49+
Ending process stops the robot controller and turns it to HOLD state. The display on the Teach pendant will show the figure below.
50+
51+
![END Display on TP](end-display-on-tp.png)]
52+
53+
# 3. Driver State
54+
55+
To control robot controller on ROS, the drivere has control states.
56+
57+
![Driver State](driver-state.png)
58+
59+
```
60+
0: "INIT" - Driver init state.
61+
1: "CONNECTING" - Driver is now connecting to Robot Controller.
62+
2: "CONNECTED" - Driver is connected to Robot Controller, but cannot control Robot Arm.
63+
3: "ACTIVATING" - Driver is now activating Robot Arm.
64+
4: "ACTIVE" - Driver can control Robot Arm.
65+
5: "DEACTIVATING" - Driver is now deactivating Robot Arm.
66+
6: "DISCONNECTING" - Driver is now disconnecting to Robot Controller.
67+
7: "DISCONNECTED" - Driver is disconnected to Robot Controller.
68+
8: "ERROR" - Driver halted due to ERROR.
69+
9: "RESTART" - Driver accepts restart instruction.
70+
10: "QUIT" - Driver accepts quit instruction.
71+
```
72+
73+
You can get this status by Command Service "get_status".
74+
75+
76+
# 4. Command Service
77+
78+
Service "khi_robot_command_service" is available.
79+
80+
Service format is below...
81+
```
82+
string type
83+
string cmd
84+
---
85+
int32 driver_ret
86+
int32 as_ret
87+
string cmd_ret
88+
```
89+
90+
Command format is below...
91+
92+
## Execute AS Language Command
93+
```
94+
string type -> "as"
95+
string cmd -> AS Language Command
96+
---
97+
int32 driver_ret -> driver's return code. Refer KRNX_E_*** in krnx.h
98+
int32 as_ret -> AS return code. Refer AS manual.
99+
string cmd_ret -> Response of AS Language Command
100+
```
101+
102+
## Get Signal Status of [NUM]
103+
```
104+
string type-> "driver"
105+
string cmd -> "get_signal [NUM]"
106+
---
107+
int32 driver_ret -> driver's return code. Refer KRNX_E_*** in krnx.h
108+
int32 as_ret -> AS return code. Refer AS manual.
109+
string cmd_ret -> "-1"(ON) or "0"(OFF)
110+
```
111+
[NUM] range (depended on AS system setting)
112+
```
113+
Output: 1~512
114+
Input: 1001~1512
115+
Internal: 2001~2512
116+
```
117+
118+
## Set Output Signal Status of [NUM]
119+
```
120+
string type -> "driver"
121+
string cmd -> "set_signal [NUM], ..."
122+
---
123+
int32 driver_ret -> driver's return code. Refer KRNX_E_*** in krnx.h
124+
int32 as_ret -> AS return code. Refer AS manual.
125+
string cmd_ret -> NOT USED
126+
```
127+
[NUM] range (depended on AS system setting)
128+
```
129+
Output: -1~-512, 1~512
130+
Internal: -2001~-2512, 2001~2512
131+
(Positive value indicates ON state, and negative value does OFF state.)
132+
```
133+
134+
## Get Driver Status
135+
```
136+
string type -> "driver"
137+
string cmd -> "get_status"
138+
---
139+
int32 driver_ret -> driver's return code. Refer KRNX_E_*** in krnx.h
140+
int32 as_ret -> AS return code. Refer AS manual.
141+
string cmd_ret -> Driver Status
142+
```
143+
144+
## Restart Driver when its status is ERROR
145+
```
146+
string type -> "driver"
147+
string cmd -> "restart"
148+
---
149+
int32 driver_ret -> driver's return code. Refer KRNX_E_*** in krnx.h
150+
int32 as_ret -> AS return code. Refer AS manual.
151+
string cmd_ret -> NOT USED
152+
```
153+
154+
## Quit Driver
155+
```
156+
string type -> "driver"
157+
string cmd -> "quit"
158+
---
159+
int32 driver_ret -> driver's return code. Refer KRNX_E_*** in krnx.h
160+
int32 as_ret -> AS return code. Refer AS manual.
161+
string cmd_ret -> NOT USED
162+
```
163+
164+
# 5. Error and Troubleshooting
165+
166+
All of the errors happened during ROS control process will be sent as a message in Error level.
167+
Frequent error messages and troubleshooting are as shown in the table below.
168+
169+
|Error message|Troubleshooting|
170+
|---|---|
171+
|ROS:%s does not match AS:%s|Match the robot model on ROS and robot controller.|
172+
|Please change Robot Controller's TEACH/REPEAT to REPEAT|Switch the TEACH/REPEAT mode of the robot controller to REPEAT.|
173+
|Please change Robot Controller's RUN/HOLD to RUN|Switch the RUN/HOLD of the robot controller to RUN.|
174+
|Please change Robot Controller's TEACH LOCK to OFF|Set the TEACH LOCK on the robot controller to OFF.|
175+
|Please change Robot Controller's EMERGENCY to OFF|Release the EMERGENCY button.|
176+
|ERROR [cont_no]: rno:[robot_no] code:[as_error_code]|Error occurred during the real-time control.<br>Check the error code “as_error_code” of the robot controller and release the error by refering to the [AS Language Reference Manual].|
177+
|RTC terminated %d: rno:%d|Real-time control of the robot controller is terminated. Restart the “khi_robot_control”.|
178+
|[KhiKrnxDriver] %s returned -0x%X|API %s of KRNX returned the error code -0x%X. Refer to the error code of the KRNX API and release the error.|
179+
180+
181+
Error code of KRNX API is defined in “khi_robot/khi_robot_control/include/khi_robot_control/krnx.h”. Description and Value of the error codes are shown in the table below. (Table 2)
182+
183+
|Macro Definition|Description|Value|
184+
|---|---|---|
185+
|KRNX_NOERROR|No Error|(0x0000)|
186+
|KRNX_E_BADARGS|Invalid Argument|(-0x1000)|
187+
|KRNX_E_INTERNAL|Internal Error|(-0x1001)|
188+
|KRNX_E_NOTSUPPORTED|Not Supported API |(-0x1002)|
189+
|KRNX_E_TIMEOUT|Timeout|(-0x1003)|
190+
|KRNX_E_AUXNOTREADY|AUX Monitor Not Ready|(-0x1004)|
191+
|KRNX_E_FOPENFAIL|File Open Fail|(-0x1005)|
192+
|KRNX_E_FILENOTREADY|File Not Exist|(-0x1006)|
193+
|KRNX_E_MATRIX|Matrix Calculation Error|(-0x1007)|
194+
|KRNX_E_OUTOFRANGE|Inverse Conversion Error|(-0x1008)|
195+
|KRNX_E_CANNOTCAL|Inverse Jacobian Error|(-0x1009)|
196+
|KRNX_E_COMPDATA|RTC Error|(-0x100a)|
197+
|KRNX_E_BADUSERID|Bad User ID|(-0x100c)|
198+
|KRNX_E_NULLRESP|Data Not Received|(-0x100d)|
199+
|KRNX_E_LOSTPROMPT|Timeout for Prompt Receive|(-0x100e)|
200+
|KRNX_E_BUFSND|Communication Send Error|(-0x1010)|
201+
|KRNX_E_BUFRCV|Communication Receive Error|(-0x1011)|
202+
|KRNX_E_BUFTMO|Communication Timeout|(-0x1012)|
203+
|KRNX_E_ASERROR|AS Error|(-0x1020)|
204+
|KRNX_E_NOROBOT|No Robot Setting|(-0x1021)|
205+
|KRNX_E_SOCK|Socket Create Error|(-0x2000)|
206+
|KRNX_E_NOHOST|Bad Hostname|(-0x2001)|
207+
|KRNX_E_IOCTLSOCK|Socket Setting Error|(-0x2002)|
208+
|KRNX_E_SOCKWRITE|Socket Write Error|(-0x2003)|
209+
|KRNX_E_SOCKREAD|Socket Read Error|(-0x2004)|
210+
|KRNX_E_NODATA|No Socket Data|(-0x2005)|
211+
|KRNX_E_INVALIDPORT|Invalid Port Number|(-0x2006)|
212+
|KRNX_E_CONNECT|Socket Connect Fail|(-0x2007)|
213+
|KRNX_E_CANTLOGIN|Login Fail|(-0x2008)|
214+
|KRNX_E_ALREADYOPENED|Socket Already Used|(-0x2009)|
215+
|KRNX_E_UNEXPECTED|Received Data Error|(-0x2010)|
216+
|KRNX_E_KINENOTREADY|Kinematics Not Initialized|(-0x2011)|
217+
|KRNX_E_ASDELAYED|Communication Sync Error|(-0x2012)|
218+
|KRNX_E_BUFEMPTY|Communication Buffer Error|(-0x2013)
219+
|KRNX_E_BUFNO|Invalid Buffer Number|(-0x2014)
220+
|KRNX_E_BUFDATANUM|Send Data Error|(-0x2015)
221+
|KRNX_E_RT_INTERNAL|RT Communication Internal Error|(-0x2100)
222+
|KRNX_E_RT_CONNECT|RT Communication Connect Error|(-0x2101)|
223+
|KRNX_E_RT_TIMEOUT|RT Communication Timeout|(-0x2102)|
224+
|KRNX_E_RT_NOTCONNECT|RT Communication Connect Error|(-0x2103)|
225+
|KRNX_E_RT_SEND|RT Communication Send Error|(-0x2104)|
226+
|KRNX_E_PCASALREADYRUNNING|PC-AS Already Running|(-0x2200)|
227+
|KRNX_E_TOOMANYPROC|Too Many Process|(-0x2201)|
228+
|KRNX_E_INVALIDFILENAME|Invalid File Name|(-0x2202)|
229+
|KRNX_E_ILLCONTNO|Invalid Controller Number|(-0x2203)|
230+
|KRNX_E_UNDEFF|Undefined Error|(-0xFFFF)|
231+
232+
# 6. Precausions
233+
234+
* Make sure to use realtime kernel for Ubuntu 16.04.
235+
* When a robot controller is in the real-time control mode, its state is same as the REPEAT mode. Therefore make sure to the safety issues when the robot controller is in real-time control mode.
236+
* Never make any changes on the sources of the “khi_robot” package.
237+
* Refer to the Documents and community of the MoveIt! for more details on motion/path planning and how to calculate command value.

docs/driver-state.png

80.6 KB
Loading

docs/end-display-on-tp.png

10.3 KB
Loading

docs/start-display-on-tp.png

12.4 KB
Loading

duaro_description/CHANGELOG.rst

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2+
Changelog for package duaro_description
3+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
4+
5+
1.0.0 (2019-03-28)
6+
------------------
7+
* Refactoring
8+
* duAro URDF modification
9+
* Contributors: nakamichi_d, matsui_hiro
10+
11+
0.9.4 (2019-01-25)
12+
------------------
13+
14+
0.9.3 (2019-01-21)
15+
------------------
16+
17+
0.9.2 (2018-12-27)
18+
------------------
19+
* RESTART function
20+
* KHI Command service
21+
* duAro URDF modification
22+
* RS080N
23+
* Unifying RS series URDF/Gazebo into rs_description, rs_gazebo
24+
* Modification of ACTIVATING state
25+
* Modification of QUIT state
26+
* Modification of state definition
27+
* Changing start position "ALL 0 degree" to "Current degree position"
28+
* Contributors: nakamichi_d

0 commit comments

Comments
 (0)