Skip to content

Commit

Permalink
Merge branch 'master' into sanity-diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
k-okada authored Aug 10, 2022
2 parents ea5bb8d + 60e85bd commit 5cd00e2
Show file tree
Hide file tree
Showing 13 changed files with 334 additions and 36 deletions.
5 changes: 5 additions & 0 deletions .travis.rosinstall.kinetic
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@
local-name: jsk-ros-pkg/jsk_common
uri: https://github.com/jsk-ros-pkg/jsk_common.git
version: 2.2.12
# denso_cobotta_control, denso_cobotta_descriptions, denso_cobotta_driver, and denso_cobotta_gripper are not released
- git:
local-name: DENSORobot/denso_cobotta_ros
uri: https://github.com/DENSORobot/denso_cobotta_ros.git
version: 1a4a74a92c763906c47eec574b5b3dbaa52f622e
5 changes: 5 additions & 0 deletions .travis.rosinstall.melodic
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@
- git:
local-name: UbiquityRobotics/magni_robot
uri: https://github.com/UbiquityRobotics/magni_robot
# denso_cobotta_control, denso_cobotta_descriptions, denso_cobotta_driver, and denso_cobotta_gripper are not released
- git:
local-name: DENSORobot/denso_cobotta_ros
uri: https://github.com/DENSORobot/denso_cobotta_ros.git
version: bb60e75adb8477ed3402561b4ec3ba687af3f397
# switchbot_ros is not correctly released.
# see: https://github.com/jsk-ros-pkg/jsk_3rdparty/issues/356
- git:
Expand Down
21 changes: 5 additions & 16 deletions .travis.rosinstall.noetic
Original file line number Diff line number Diff line change
@@ -1,26 +1,10 @@
#roseus is not released on melodic
- git:
local-name: euslisp-release
uri: https://github.com/tork-a/euslisp-release
version: release/melodic/euslisp
- git:
local-name: jskeus-release
uri: https://github.com/tork-a/jskeus-release
version: release/melodic/jskeus
- git:
local-name: jsk_roseus
uri: https://github.com/jsk-ros-pkg/jsk_roseus
# find_package(collada_urdf) failed due to wrong collada_urdfConfig.cmake
# - https://github.com/ros/collada_urdf/issues/43
# - https://github.com/ros/collada_urdf/pull/44
- git:
local-name: collada_urdf
uri: https://github.com/werner291/collada_urdf.git
version: patch-1
# compile euscollada for installed collada_urdf
- tar:
local-name: euscollada
uri: https://github.com/tork-a/jsk_model_tools-release/archive/refs/tags/rpm/ros-melodic-euscollada-0.4.3-0_28.tar.gz
# jsk_robot_startup LightweightLogger requires mongodb_store
# use package.xml format 3 to install python3-pymongo, see https://github.com/strands-project/mongodb_store/pull/269
- git:
Expand Down Expand Up @@ -66,3 +50,8 @@
- git:
local-name: jsk_control
uri: https://github.com/jsk-ros-pkg/jsk_control
# denso_cobotta_control, denso_cobotta_descriptions, denso_cobotta_driver, and denso_cobotta_gripper are not released
- git:
local-name: DENSORobot/denso_cobotta_ros
uri: https://github.com/DENSORobot/denso_cobotta_ros.git
version: bb60e75adb8477ed3402561b4ec3ba687af3f397
124 changes: 107 additions & 17 deletions jsk_denso_robot/README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
# jsk_denso_robot


ROS package for Denso b-CAP communication robot.
ROS package for Denso robot.
- Non-OSS type robot using b-CAP communication
- OSS type robot


## How to setup development environment
## Non-OSS type

use `wstool`, `rosdep` and `catkin` to checkout and compile the source tree.
### How to setup development environment

Use `wstool`, `rosdep` and `catkin` to checkout and compile the source tree.

```
mkdir -p ~/denso_ws/src
cd ~/denso_ws/src
wstool init
wstool merge https://raw.githubusercontent.com/k-okada/jsk_robot/add_cobotta/jsk_denso_robot/denso.rosinstall
wstool merge https://raw.githubusercontent.com/jsk-ros-pkg/jsk_robot/master/jsk_denso_robot/denso.rosinstall
wstool update
cd ../
git clone https://github.com/k-okada/cobotta_descriptions.git
Expand All @@ -23,12 +27,12 @@ catkin build cobottaeus jsk_cobotta_startup -vi
source devel/setup.bash
```

## COBOTTA Setup
### COBOTTA Setup

Please refer to [COBOTTA User Manuals](https://www.fa-manuals.denso-wave.com/jp/COBOTTA/007030/) to setup your robot.
To install Virtual TP software, please refer to [Software Install](https://www.fa-manuals.denso-wave.com/jp/COBOTTA/007263/) section of the User Manuals.

## Start Virtual IP
### Start Virtual IP

To control the robot, you need to start Virtual TP software and push top-left 'Connect' menu.

Expand All @@ -39,19 +43,19 @@ Then you need to input the IP address of your robot. The default robot IP addres

![](img/vtp-connect.png)

To control the robot, you need to specify user level and password. The default password can be find [COBOTTA User Manuals](https://www.fa-manuals.denso-wave.com/jp/COBOTTA/007030/)
To control the robot, you need to specify user level and password. The default password can be found on [COBOTTA User Manuals](https://www.fa-manuals.denso-wave.com/jp/COBOTTA/007030/).

![](img/vtp-login.png)

You can skip calibration section and also put "Prepare Motion"
You can skip calibration section and also put "Prepare Motion".

![](img/vtp-skip.png)

This is main user interface. You can push 'cancel' button on right-top to back to this panel.

![](img/vtp-display.png)

### Setup IP address of the robot
#### Setup IP address of the robot

You may want to change IP address of the robot, to connect your network. To do this, please push "Setting" button on the right bottom.

Expand All @@ -69,12 +73,12 @@ You can set the IP address by using this 10-key like interface. You need to push

![](img/vtp-network3.png)

### Setup IP address of client computer
#### Setup IP address of client computer

To work with ROS node. You need to tell IP address of your ROS node running computer to the robot.
This is called 'executable' and you need to set 'executable' IP address from Virtual TP software.

Form main panel, push "Setting" button on the right bottom.
From main panel, push "Setting" button on the right bottom.

![](img/vtp-exec2.png)

Expand All @@ -88,7 +92,7 @@ Select 'Ethernet' tab and change IP address.

You can set the IP address by using this 10-key like interface. You need to push 'OK' button of 10-key like panel, and then push 'OK' button of 'Communication Setting' panel.

## Start ROS Node
### Start ROS Node

```
source ~/denso_ws/devel/setup.bash
Expand All @@ -97,9 +101,9 @@ roslaunch --screen jsk_cobotta_startup cobotta_bringup.launch ip_address:=192.16

Make sure that `ip_address` is set by [Setup IP address of the robot](#setup-ip-address-of-the-robot) and your ROS client node IP address is set by [Setup IP address of client computer](#setup-ip-address-of-client-computer).

## Use EusLisp model
### Use EusLisp model

To control the robot form EusLisp. Please start `roseus` and type as follows.
To control the robot from EusLisp. Please start `roseus` and type as follows.

```
(load "package://cobottaeus/cobotta-interface.l")
Expand Down Expand Up @@ -128,7 +132,7 @@ You can also use `move-end-rot` method to turn the gripper.
```


To control real robot. you can use `*ri*` object.
To control real robot, you can use `*ri*` object.
```
(send *ri* :angle-vector (send *cobotta* :angle-vector) 2000)
```
Expand All @@ -139,15 +143,15 @@ To obtain current robot pose, use `:state :potentio-vector` method.
(send *ri* :state :potentio-vector)
```

To open and close the gripper. You can use `:start-grasp` and `:stop-grasp`.
To open and close the gripper, you can use `:start-grasp` and `:stop-grasp`.
```
(send *ri* :stop-grasp)
(send *ri* :start-grasp)
```

`:start-grasp` method returns `t` if it succeeded to grasp object. If it returns `nil`, nothing was grasped.

When the robot detect errors, the LED of the robot become yellow or red. Or you can find warning message like follows.
When the robot detects errors, the LED of the robot becomes yellow or red. Or you can find warning message like follows.
```
[ WARN] [1607683352.232275227]: Call {func_id: 72, vntArgs: ({vt: 3, value: 182} {vt: 3, value: 1} {vt: 8, value: P(210.0,0.0,-60.0,180.0,0.0,80.0,261)} {vt: 8, value: })}
-2111814862 -7ddfbcce
Expand All @@ -164,5 +168,91 @@ If error still occurs, try `:dispose` and `:init` again.
(send *ri* :init)
```

## COBOTTA OSS type

### Official documents

- [ROS Wiki](http://wiki.ros.org/denso_cobotta_ros)
- [Web manual](https://densorobot.github.io/docs/denso_cobotta_ros)
- [Driver page](https://www.denso-wave.com/ja/robot/download/application/cobotta_driver_for_linux.html)

### How to setup development environment on your PC

If you already setup environment for Non-OSS type, you can reuse it.
Just in case, do `wstool update` and `catkin build cobottaeus jsk_cobotta_startup -vi` again.
Otherwise, do the following:
```bash
mkdir -p ~/denso_ws/src
cd ~/denso_ws/src
wstool init
wstool merge https://raw.githubusercontent.com/jsk-ros-pkg/jsk_robot/master/jsk_denso_robot/denso.rosinstall
wstool update
cd ../
source /opt/ros/melodic/setup.bash
rosdep install -y -r --from-paths src --ignore-src
catkin build cobottaeus jsk_cobotta_startup -vi
source devel/setup.bash
```

### COBOTTA Setup

#### 1st step: setup Denso default environment

Basically, refer to the documents in the file downloaded from [Driver page](https://www.denso-wave.com/ja/robot/download/application/cobotta_driver_for_linux.html) to setup your robot.
But please read the following before setup:

- After installing Ubuntu on the robot, you should install and use the Kernel version supported by COBOTTA.
Supported versions are listed on README in the top directory.
You should install and use the latest version currently supported (hereinafter `XX`, e.g., `5.4.0-58-generic`):
```bash
sudo apt install linux-image-XX
sudo apt install linux-modules-extra-XX
sudo vi /etc/default/grub # Set GRUB_DEFAULT as "Ubuntu, with Linux XX"
sudo update-grub
# cf. https://askubuntu.com/questions/68547/editing-the-default-boot-item-in-grub-menu-a-definitive-answer
```
After this, you should reboot the robot by turn the switch OFF and ON.

- By default, you should load the driver and change permission of the device file every time rebooting the robot.
If you want the robot to execute them automatically, do the following setting:
```bash
echo -e '#!/bin/bash\nsudo modprobe denso_cobotta io_power_mode=1\nsudo chown [YOUR LOGIN NAME]:[YOUR LOGIN GROUP] /dev/denso_cobotta' > ~/cobotta_startup.sh
chmod +x ~/cobotta_startup.sh
sudo bash -c "echo -e '@reboot root /home/[YOUR LOGIN NAME]/cobotta_startup.sh\n' > /etc/cron.d/cobotta_startup"
```

#### 2nd step: setup JSK environment

```bash
source ~/[WORKSPACE YOU CREATED AT 1ST STEP]/devel/setup.bash
mkdir -p ~/jsk_ws/src
cd ~/jsk_ws/src
git clone https://github.com/jsk-ros-pkg/jsk_robot.git
cd ../
rosdep install -y -r --from-paths src/jsk_robot/jsk_denso_robot --ignore-src
catkin build cobottaeus jsk_cobotta_startup -vi
source devel/setup.bash
```

### Start ROS Node

Run the following inside the robot (via SSH or keyboard):
```bash
roslaunch jsk_cobotta_startup cobotta_oss_bringup.launch
```

### Use EusLisp model

Almost the same as [the instruction of COBOTTA non-OSS type](#use-euslisp-model) except:

- Model loading should be:
```lisp
(load "package://cobottaeus/cobotta-oss-interface.l")
(cobotta-oss-init)
```
- Warning message while the robot detects errors is mainly displayed on `cobotta_oss_bringup.launch`
- After clearing error (`(send *ri* :clear-error)`), you should call `(send *ri* :motor-on)` to return your robot to normal state
- `(send *ri* :dispose)` is not implemented (we do not think this is needed on OSS type)

---
If you have any question, please feel free to file open at https://github.com/jsk-ros-pkg/jsk_robot/issues
1 change: 1 addition & 0 deletions jsk_denso_robot/cobottaeus/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cobotta.l
2 changes: 1 addition & 1 deletion jsk_denso_robot/cobottaeus/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ message("cobotta_urdf: ${_cobotta_urdf}")
message("collada2eus: ${_collada2eus}")

add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/cobotta.urdf
COMMAND xacro ${_cobotta_urdf}/cobotta.urdf.xacro > ${PROJECT_BINARY_DIR}/cobotta.urdf
COMMAND xacro --inorder ${_cobotta_urdf}/cobotta.urdf.xacro > ${PROJECT_BINARY_DIR}/cobotta.urdf
DEPENDS ${_cobotta_urdf}/cobotta.urdf.xacro)
add_custom_command(OUTPUT ${PROJECT_SOURCE_DIR}/cobotta.l
COMMAND echo "${_collada2eus} ${PROJECT_BINARY_DIR}/cobotta.urdf cobotta.l"
Expand Down
Loading

0 comments on commit 5cd00e2

Please sign in to comment.