|
@@ -0,0 +1,35 @@
|
|
|
|
+# blackTornadoRobot ros&arduino通信
|
|
|
|
+
|
|
|
|
+### 单独调试arduino夹爪部分
|
|
|
|
+首先启动ros_arduino_bridge
|
|
|
|
+
|
|
|
|
+```sh
|
|
|
|
+$ roslaunch ros_arduino_python arduino.launch
|
|
|
|
+```
|
|
|
|
+
|
|
|
|
+这时候通过
|
|
|
|
+```sh
|
|
|
|
+$ rosservice list
|
|
|
|
+```
|
|
|
|
+可以看到启动的ros service列表
|
|
|
|
+```sh
|
|
|
|
+/mobilebase_arduino/alarm_write
|
|
|
|
+/mobilebase_arduino/analog_read
|
|
|
|
+/mobilebase_arduino/analog_write
|
|
|
|
+/mobilebase_arduino/digital_read
|
|
|
|
+/mobilebase_arduino/digital_set_direction
|
|
|
|
+/mobilebase_arduino/digital_write
|
|
|
|
+/mobilebase_arduino/get_loggers
|
|
|
|
+/mobilebase_arduino/gripper_control
|
|
|
|
+/mobilebase_arduino/light_show
|
|
|
|
+/mobilebase_arduino/set_logger_level
|
|
|
|
+/rosout/get_loggers
|
|
|
|
+/rosout/set_logger_level
|
|
|
|
+```
|
|
|
|
+其中服务/mobilebase_arduino/gripper_control用来夹爪舵机。
|
|
|
|
+可通过
|
|
|
|
+```sh
|
|
|
|
+$ rosservice call /mobilebase_arduino/gripper_control [operation]
|
|
|
|
+```
|
|
|
|
+控制舵机。其中操作指令1:打开夹爪下行;2:停止机械臂运动;3:合上夹爪上行;4:张开夹爪;5:合上夹爪
|
|
|
|
+
|