Skip to content

Commit

Permalink
ROS2 -> ROS 2 (#49)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephanie-eng authored Mar 14, 2023
1 parent 15c2ee0 commit d4674d8
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
This is a meta-package containing everything to run an ABB robot or simulation with ROS2.
This is a meta-package containing everything to run an ABB robot or simulation with ROS 2.

- `abb_bringup`: Launch files and ros2_control config files that are generic to many types of ABB robots.
- `abb_hardware_interface`: A ros2_control hardware interface using abb_libegm.
Expand All @@ -15,7 +15,7 @@ There are three ways to use this package:

- With an actual, physical ABB robot

- With ROS2 simulating the robot controllers
- With ROS 2 simulating the robot controllers

- With an ABB RobotStudio simulation. Requires 2 PC's (one Windows, one Linux)

Expand Down
2 changes: 1 addition & 1 deletion abb_hardware_interface/abb_hardware_interface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
type="abb_hardware_interface::ABBSystemHardware"
base_class_type="hardware_interface::SystemInterface">
<description>
ROS2 Control ABB driver.
ROS 2 Control ABB driver.
</description>
</class>
</library>
2 changes: 1 addition & 1 deletion abb_ros2/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package format="3">
<name>abb_ros2</name>
<version>0.0.0</version>
<description>Meta package containing everything to run an ABB robot or simulation with ROS2</description>
<description>Meta package containing everything to run an ABB robot or simulation with ROS 2</description>

<maintainer email="[email protected]">Stephanie Eng</maintainer>
<maintainer email="[email protected]">Andy Zelenak</maintainer>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class RWSServiceProviderROS
/**
* \brief Creates a services server.
*
* \param node ROS2 node.
* \param node ROS 2 node.
* \param robot_ip IP address for the robot controller's RWS server.
* \param robot_poty Port number for the robot controller's RWS server.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class RWSStatePublisherROS
/**
* \brief Creates a state publisher.
*
* \param node ROS2 node.
* \param node ROS 2 node.
* \param robot_ip IP address for the robot controller's RWS server.
* \param robot_poty Port number for the robot controller's RWS server.
*/
Expand Down
12 changes: 6 additions & 6 deletions docs/NetworkingConfiguration.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Networking Configuration

This document covers various options to configure the network connection between the ROS2 computer and the RWS server. For general driver setup instructions, see [the README](./README.md).
This document covers various options to configure the network connection between the ROS 2 computer and the RWS server. For general driver setup instructions, see [the README](./README.md).

## Changing the RWS port

Expand All @@ -24,14 +24,14 @@ See [this forum post](https://forums.robotstudio.com/discussion/12177/how-to-cha

## Adding the local computer to the virtual controller whitelist

To access the virtual controller with RWS from a networked ROS2 computer, you will need to whitelist the ROS2 computer's IP on the RobotStudio computer. Without this whitelist, you will get an RAPI Unidentified Error when trying to access the controller. You can verify this if you try to navigate to `<ROBOTSTUDIO_COMPUTER_IP>:80` from the ROS2 computer. The default credentials are:
To access the virtual controller with RWS from a networked ROS 2 computer, you will need to whitelist the ROS 2 computer's IP on the RobotStudio computer. Without this whitelist, you will get an RAPI Unidentified Error when trying to access the controller. You can verify this if you try to navigate to `<ROBOTSTUDIO_COMPUTER_IP>:80` from the ROS 2 computer. The default credentials are:

```
Username: Default User
Password: robotics
```

To whitelist the ROS2 computer's IP, on the RobotStudio computer, navigate to:
To whitelist the ROS 2 computer's IP, on the RobotStudio computer, navigate to:

`C:\Users\<USER>\AppData\Roaming\ABB Industrial IT\Robotics IT\RobVC\`

Expand All @@ -48,7 +48,7 @@ Paste the following into`vcconf.xml`:
</VCConfiguration>
```

Change ROS2_COMPUTER_IP to the IP of the ROS2 computer. Up to 10 IP addresses can be whitelisted by adding additional `<host ip="..."/>` lines. Restart RobotStudio after the update.
Change ROS2_COMPUTER_IP to the IP of the ROS 2 computer. Up to 10 IP addresses can be whitelisted by adding additional `<host ip="..."/>` lines. Restart RobotStudio after the update.

See [this forum post](https://forums.robotstudio.com/discussion/12082/using-robotwebservices-to-access-a-remote-virtual-controller) for more details.

Expand All @@ -62,7 +62,7 @@ Start the SSH server by running the following command in PowerShell as an admini

```Start-Service sshd```

On the ROS2 computer, set up the SSH port forward by typing the following command into the terminal:
On the ROS 2 computer, set up the SSH port forward by typing the following command into the terminal:

```ssh -L <DESTINATION_PORT>:localhost:<RWS_PORT> <ROBOTSTUDIO_USER>@<ROBOTSTUDIO_IP>```

Expand All @@ -73,7 +73,7 @@ On the ROS2 computer, set up the SSH port forward by typing the following comman

Enter the Windows login password for the `<ROBOTSTUDIO_USER>` account when prompted.

This will allow you to access RWS on the ROS2 computer on `127.0.0.1:<DESTINATION_PORT>`. When launching ROS, use this value for rws_ip: `127.0.0.1`. The full launch command would be:
This will allow you to access RWS on the ROS 2 computer on `127.0.0.1:<DESTINATION_PORT>`. When launching ROS, use this value for rws_ip: `127.0.0.1`. The full launch command would be:

ros2 launch abb_bringup abb_control.launch.py description_package:=abb_irb1200_support description_file:=irb1200_5_90.xacro launch_rviz:=false moveit_config_package:=abb_irb1200_5_90_moveit_config use_fake_hardware:=false rws_ip:=127.0.0.1 rws_port:=<DESTINATION_PORT>

Expand Down
16 changes: 8 additions & 8 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Building the package in ROS2
# Building the package in ROS 2

Create a ROS2 workspace per the online tutorial. Clone this package into your workspace's `src` directory.
Create a ROS 2 workspace per the online tutorial. Clone this package into your workspace's `src` directory.

Import package dependencies:

Expand All @@ -20,9 +20,9 @@ Quickly verify the build by launching RViz and viewing the robot:

ros2 launch abb_irb1200_support view_robot.launch.py

# Simulating a robot in ROS2
# Simulating a robot in ROS 2

For this simulation, ROS2 simulates the robot controllers. RobotStudio or a physical robot are not needed.
For this simulation, ROS 2 simulates the robot controllers. RobotStudio or a physical robot are not needed.

ros2 launch abb_bringup abb_control.launch.py description_package:=abb_irb1200_support description_file:=irb1200_5_90.xacro launch_rviz:=false moveit_config_package:=abb_irb1200_5_90_moveit_config use_fake_hardware:=true

Expand All @@ -34,7 +34,7 @@ After launching the controllers, launch MoveIt:

The simulation files are a modified version from the [abb_libegm library](https://github.com/ros-industrial/abb_libegm/issues/18#issuecomment-473262645) with some additional details about setting up EGM.

Running this simulation requires two computers communicating over the network: a Windows computer running RobotStudio, and a ROS2 computer running the driver.
Running this simulation requires two computers communicating over the network: a Windows computer running RobotStudio, and a ROS 2 computer running the driver.

## Packaged Sim

Expand All @@ -61,12 +61,12 @@ Once the simulation is set up, either via the Pack and Go or by setting up a new

Start the controller under the `RAPID` tab by selecting `T_ROB1` (and `T_EXTAXIS` for the external axis example) as the task under `Selected Tasks`, and pressing the `Start` icon on the ribbon.

The simulation will then try to connect with the ROS2 driver every few seconds. Once the connection is established, the simulated robot can be controlled from the ROS2 computer.
The simulation will then try to connect with the ROS 2 driver every few seconds. Once the connection is established, the simulated robot can be controlled from the ROS 2 computer.

![start](images/egm5.png)

## Connecting with ROS2
Connecting RWS with ROS2 may require some configuration. See [Networking Configuration](./NetworkingConfiguration.md) for more details.
## Connecting with ROS 2
Connecting RWS with ROS 2 may require some configuration. See [Networking Configuration](./NetworkingConfiguration.md) for more details.

The driver reqiures some network information to connect to EGM and RWS. This information is stored in the ros2_control [robot description file](../robot_specific_config/abb_irb1200_support/urdf/irb1200.ros2_control.xacro). Change the following lines as required (below configured for an example not using MultiMove):

Expand Down
10 changes: 5 additions & 5 deletions docs/RobotStudioSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ The following steps will cover how to set up the controller for EGM with a robot

## Controller Configuration

3. Configure the communication settings for the controller to connect with the ROS2 computer. Identify the IP of the ROS2 computer, and the port used for EGM communication. The port is set by the `robotstudio_port` hardware parameter in the robot ros2_control description file. To configure the controller, navigate to the `Controller Tab` --> `Configuration` --> `Communication`. On the right, under `Transmission Protocol` right click and `Add new`.
3. Configure the communication settings for the controller to connect with the ROS 2 computer. Identify the IP of the ROS 2 computer, and the port used for EGM communication. The port is set by the `robotstudio_port` hardware parameter in the robot ros2_control description file. To configure the controller, navigate to the `Controller Tab` --> `Configuration` --> `Communication`. On the right, under `Transmission Protocol` right click and `Add new`.

![communication](images/egm2.png)

- Set the name to be `ROB_1`
- Set the type to `UDPUC`. If you don't see this option, EGM was not added to the controller.
- Set the Remote Address to be that of the ROS2 computer. In the Pack and Go file, this is set to `169.254.53.52`, but this will likely need to be changed.
- Set the Remote port number to match what ROS2 control driver is expecting. In the sample solution, it is set to `6511`.
- Set the Remote Address to be that of the ROS 2 computer. In the Pack and Go file, this is set to `169.254.53.52`, but this will likely need to be changed.
- Set the Remote port number to match what ROS 2 control driver is expecting. In the sample solution, it is set to `6511`.
- Leave the Local port number set to `0`
- Press OK at the bottom of the window to confirm the changes

Expand Down Expand Up @@ -124,8 +124,8 @@ Your Task configuration should look similar to the screenshot below:
- Add a new configuration for the external axis.
- Set the Transmission Protocol name (`EXTAX` in the example)
- Set the type to `UDPUC`. If you don't see this option, EGM was not added to the controller.
- Set the Remote Address to be that of the ROS2 computer. In the Pack and Go file, this is set to `169.254.53.52`, but this will likely need to be changed.
- Set the Remote port number to match what ROS2 control driver is expecting (`6512` in the example).
- Set the Remote Address to be that of the ROS 2 computer. In the Pack and Go file, this is set to `169.254.53.52`, but this will likely need to be changed.
- Set the Remote port number to match what ROS 2 control driver is expecting (`6512` in the example).

![new transmission](images/multimove11.PNG)

Expand Down
10 changes: 5 additions & 5 deletions docs/Troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

## EGM Connection Issues
- Occasionally, when connecting for the first time, you will need to stop the RAPID program and start it again
- The warning message `41822 No data from the UdpUc device[*]` indicates a connection issue between the RobotStudio and the ROS2 computer
- The warning message `41822 No data from the UdpUc device[*]` indicates a connection issue between the RobotStudio and the ROS 2 computer
- Check that the communication settings are correct
- Test the connection between the computers by pinging the ROS2 computer from the RobotStudio computer and vice-versa
- Test the connection between the computers by pinging the ROS 2 computer from the RobotStudio computer and vice-versa
- Check that the firewall settings on the RobotStudio computer allow communication over UDP on the correct port
- Verify that the ros2_control_node is listening on the correct UDP socket on the ROS2 computer
- Verify that the ros2_control_node is listening on the correct UDP socket on the ROS 2 computer
- If using a container, verify that the required port is forwarded correctly
- It may help switch the port by changing both the `robotstudio_port` hardware parameter on the ROS2 control side, and the port number under the `ROB_1` configuration on the RobotStudio side
- It may help switch the port by changing both the `robotstudio_port` hardware parameter on the ROS 2 control side, and the port number under the `ROB_1` configuration on the RobotStudio side

## RWS Connection Issues
- Try navigating to `<ROBOTSTUDIO_IP>:80?debug=true` in the browser and logging in with the default credentials (user = `Default User`, pw = `robotics`)
- If you don't see a login prompt, the ROS2 computer is not communicating with the RWS server.
- If you don't see a login prompt, the ROS 2 computer is not communicating with the RWS server.
- After logging in, if you see `RAPI Unidentified Error`, try [whitelisting the ROS computer's IP](./NetworkingConfiguration.md#adding-the-local-computer-to-the-virtual-controller-whitelist)
- A workaround to the whitelisting solution is to [use SSH port forwarding](./NetworkingConfiguration.md#configuring-ssh-port-forwarding)

0 comments on commit d4674d8

Please sign in to comment.