Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/master and subscribers #338

Merged
merged 42 commits into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
aafa4f1
add slave0
fdunz Aug 18, 2021
02755c9
merging main
ct2034 Oct 7, 2022
5ee544e
fixing merge problems
ct2034 Oct 7, 2022
abdf28a
it compiles
ct2034 Oct 13, 2022
14567ce
renaming carried through
ct2034 Oct 13, 2022
4b48069
new param for subscribers and multiple scan buffers
ct2034 Oct 24, 2022
8b098be
publishing for both scanners
ct2034 Oct 26, 2022
701efd9
publishing with different tf fram
ct2034 Oct 26, 2022
071dbbc
moving the message into the buffer
ct2034 Oct 26, 2022
c2aafec
less verbose
ct2034 Oct 26, 2022
e5147a3
Merge branch 'PilzDE:feature/add-subscriber' into feature/add-subscriber
PilzES Dec 11, 2023
09dbdb0
adding marker zones Master/Subscriber
Dec 11, 2023
21a6b3d
Delete settings.json
Dec 11, 2023
b256fe7
update zonSet markers visualization and compability with one scanner,…
Dec 27, 2023
d262184
update psen_scan_v2.launch
Dec 27, 2023
8f08374
update code optimization
Jan 2, 2024
707f05b
all tests passed
Jan 4, 2024
d773733
acceptance test multiple zones display compatible with python2
Jan 4, 2024
faf9cb6
Update README.md
PilzES Jan 4, 2024
ed5f317
Update README.md
PilzES Jan 4, 2024
66e0fce
Update README.md
PilzES Jan 4, 2024
148c1b9
Add files via upload
PilzES Jan 4, 2024
620a1cb
Update README.md
PilzES Jan 4, 2024
a928447
Update README.md
PilzES Jan 4, 2024
635cf99
Update README.md
PilzES Jan 4, 2024
6d12474
Update README.md
PilzES Jan 4, 2024
85efe6a
Update README.md
PilzES Jan 4, 2024
eecacf2
Update README.md
PilzES Jan 5, 2024
4109793
update tests for noetic
Jan 25, 2024
81ea39a
update tests with noetic success
Jan 25, 2024
cd33146
uncomment line integration_test shouldIgnoreMonitoringFrameOfFormerSc…
Jan 31, 2024
94207a2
fix test failing
Feb 7, 2024
10de87b
update test
Feb 7, 2024
2936dc1
clang tidy failing update
Feb 7, 2024
5137a6f
update all noetic test's success
Feb 11, 2024
7682784
update fix the bug of the scanCounter of the sub0 with all the test s…
Feb 19, 2024
bf0c29e
fix clang format failing test
May 20, 2024
4dda23f
fix clang-tydy format and update CHANGELOG and README
Jun 17, 2024
5af2c0a
Adding specific launch files for all the unittest
Jun 17, 2024
c85fb51
fix clang format issue
Jun 19, 2024
5c67aee
Merge remote-tracking branch 'origin/main' into feature/add-subscriber
Jun 21, 2024
a983dce
update changelog
Jun 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Changelog for package psen_scan_v2
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Forthcoming
-------------------
* Add PSENscan Subscribers up to 3 (#338)
* Add PSENscan cad meshes (#338)
* Contributors: Pilz GmbH and Co. KG

0.10.2 (2022-11-03)
-------------------
* Remove zoneset bits from IOState.input field since its redundant to the active_zoneset field (#311)
Expand Down
80 changes: 62 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,52 @@ The **psen_scan_v2** package is a ROS integration driver for the PSENscan safety
<img src="img/PSENscan.jpg" alt="PILZ safety laser scanner" title="PILZ safety laser scanner">
</p>

PSENscan firmware >= 3.1.0 is supported on the following models:

| Type | Features | Order number |
|------|----------|--------------|
| | Common features:<ul><li>compliant and approved in accordance with: EN/IEC 61496-1: Type 3, EN ISO 13849-1: PL d, IEC 61508: SIL 2</li><li>opening angle: 275°</li><li>operating range: 3.0 or 5.5 m safety zone, 40 m warning zone</li><li>reaction time: 62 ms</li><li>Protection type: IP65</li><li>Dimensions (H x W x D) in mm: 152 x 102 x 112.5</li></ul> | |
| | *Light versions* Additional features: Muting, EDM, Override | |
| PSEN sc L 3.0 08-12 | 3.0 m safety zone, 8 or 12-pin exchangeable memory module | 6D000012 |
| PSEN sc L 5.5 08-12 | 5.5 m safety zone, 8 or 12-pin exchangeable memory module | 6D000013 |
| | *Master versions* Additional features: Muting, EDM, Override, restart in accordance with EN ISO 61496-3, vertical applications| |
| PSEN sc M 3.0 08-12 | 3.0 m safety zone, 8 or 12-pin exchangeable memory module | 6D000016 |
| PSEN sc M 5.5 08-12 | 5.5 m safety zone, 8 or 12-pin exchangeable memory module | 6D000017 |
| PSEN sc ME 5.5 08-17 | Master Encoder, 5.5 m safety zone, 8/17-pin exchangeable memory | 6D000019 |
**Common features:**
<ul>
<li>Compliant and approved in accordance with:
<ul>
<li> EN/IEC 61496-1: Type 3 </li>
<li> EN ISO 13849-1: PL d </li>
<li> IEC 61508: SIL 2 </li>
</ul>
</li>
<li>Opening angle: 275°</li>
<li>Operating range: 3.0 or 5.5 m safety zone, 40 m warning zone</li>
<li>Reaction time: 62 ms</li>
<li>Protection type: IP65</li>
<li>Dimensions (H x W x D) in mm: 152 x 102 x 112.5</li>
</ul>

### The PSENscan firmware (3.1.x) is supported on the following models:

#### *Light versions*
| Type | Features | Order number |
|-----------------------|--------------------------------------------------------------------------|--------------|
| PSEN sc L 3.0 08-12 | 3.0 m safety zone, 8 or 12-pin, two safety zones active at the same time | 6D000012 |
| PSEN sc L 5.5 08-12 | 5.5 m safety zone, 8 or 12-pin, two safety zones active at the same time | 6D000013 |

Additional features: Muting, EDM, Override

#### *Master versions*
| Type | Features | Order number |
|-----------------------|---------------------------------------------------------------------------|--------------|
| PSEN sc M 3.0 08-12 | 3.0 m safety zone, 8 or 12-pin, two safety zones active at the same time | 6D000016 |
| PSEN sc M 5.5 08-12 | 5.5 m safety zone, 8 or 12-pin, two safety zones active at the same time | 6D000017 |
| PSEN sc M 5.5 08-17 | 5.5 m safety zone, 8 or 17-pin, two safety zones active at the same time | 6D000019 |
| PSEN sc ME 5.5 08-17 | 5.5 m safety zone, 8 or 17-pin, two safety zones active at the same time | 6D000034 |

Additional features: Muting, EDM, Override, restart in accordance with EN ISO 61496-3, vertical applications

#### *Subscriber versions*
| Type | Features | Order number |
|-----------------------|---------------------------------------------------------------------------|--------------|
| PSEN sc S 3.0 08-12 | 3.0 m safety zone, 8 or 12-pin, two safety zones active at the same time | 6D000020 |
| PSEN sc S 5.5 08-12 | 5.5 m safety zone, 8 or 12-pin, two safety zones active at the same time | 6D000021 |

Additional features: reference marks, vertical applications

## C++ standalone library
If you are interested in using the PSENscan safety laser scanner without ROS, please take a look at our C++ standalone library. You can read more about it [in the `standalone` folder](https://github.com/PilzDE/psen_scan_v2/blob/main/standalone/README.md)
If you are interested in using the PSENscan safety laser scanner without ROS, please take a look at our C++ standalone library. You can read more about it in the [`standalone`](https://github.com/PilzDE/psen_scan_v2/blob/main/standalone/README.md) folder.

## Table of Contents

Expand Down Expand Up @@ -57,14 +88,23 @@ sudo apt install ros-$ROS_DISTRO-psen-scan-v2
```

## Usage
To start reading data from the safety laser scanner and publishing scans execute `roslaunch psen_scan_v2 psen_scan_v2.launch` in a command line. This will launch the ROS Node with the default configuration.
This package is capable to read data from 1 Master safety laser scanner, and up to 3 Subscribers safety laser scanners, as shown below:

If you wish to set parameters from the command line, add them to the end of the command as `parameter:=value`, separated by spaces.
<p align="center">
<img src="img/Master_and_Subscribers.jpg">
</p>

To read data and publishing scans from **1** safety laser scanner (Master, Light), execute in a command line:

```bash
roslaunch psen_scan_v2 psen_scan_v2.launch sensor_ip:=192.168.0.10
```

To read the data from differents safety laser scanners (Master and Subscriber0), execute in command line:

```bash
roslaunch psen_scan_v2 psen_scan_v2.launch sensor_ip:=192.168.0.10
roslaunch psen_scan_v2 psen_scan_v2.launch sensor_ip:=192.168.0.10 nr_subscribers:=1
```
This example configures the safety laser scanner at 192.168.0.10 to send it´s frames to the ROS node at localhost.

In order to create an application with your own launch file, you can include the `bringup.launch`, where you can easily adjust the configuration parameters. A more detailed explanation can be found in the [tutorials](http://wiki.ros.org/psen_scan_v2/Tutorials/).

Expand All @@ -73,6 +113,9 @@ In order to create an application with your own launch file, you can include the
_sensor_ip_ (_string_, default: "192.168.0.10")<br/>
IP-Address of safety laser scanner.

_nr_subscribers (_int_, default: "0")<br/>
Number of Subscribers safety laser scanners connected to the Master. **Note: nr_subscribers [0 .. 3] maximum!**

### Optional Parameters

_tf_prefix_ (_string_, default: "laser_1")<br/>
Expand Down Expand Up @@ -112,6 +155,7 @@ Start a preconfigured rviz visualizing the scan data.

### Published Topics
/\<name\>/scan ([sensor_msgs/LaserScan][])<br/>
/\<name\>/scan_SubscriberX ([sensor_msgs/LaserScan][])<br/>

* If _fragmented_scans_ is set to false (default) the driver will publish complete scan rounds from the PSENscan safety laser scanner as a single message.
* If _fragmented_scans_ is enabled the driver will send the measurement data as soon as they arrive, instead of waiting for the scan round to be completed. This way the scan data is received sooner but is split into several sensor messages.
Expand Down Expand Up @@ -231,7 +275,7 @@ For visualizing the active zoneset in RViz you can run the `active_zoneset_node`
### Branching model
`main` is considered to be the active development branch, it targets the ROS distributions `melodic` and `noetic`.

The branch `ros2` is still experimental and targets the ROS 2 distributions `foxy` and `rolling`.
The `ros2` branch targets the ROS 2 `foxy`, `humble` and `rolling` distributions. You can find the location of the psen_scan_v2-2 repository at the following link: https://github.com/PilzES/psen_scan_v2-2

With the first ROS 2 release the version number model of this package was changed:
- ROS 1 releases now count from 0.10.0 upwards.
Expand Down
127 changes: 92 additions & 35 deletions config/config.rviz
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ Panels:
Expanded:
- /Global Options1
- /Status1
- /LaserScan1
- /TF1
- /RobotModel1
- /MarkerArray1
Splitter Ratio: 0.5
Tree Height: 447
Splitter Ratio: 0.6705882549285889
Tree Height: 363
- Class: rviz/Selection
Name: Selection
- Class: rviz/Tool Properties
Expand All @@ -25,12 +21,12 @@ Panels:
Expanded:
- /Current View1
Name: Views
Splitter Ratio: 0.5
Splitter Ratio: 0.6062992215156555
- Class: rviz/Time
Experimental: false
Name: Time
SyncMode: 0
SyncSource: LaserScan
SyncSource: LaserScanMaster
Preferences:
PromptSaveOnExit: true
Toolbars:
Expand Down Expand Up @@ -74,7 +70,7 @@ Visualization Manager:
Max Intensity: 2763
Min Color: 239; 41; 41
Min Intensity: 360
Name: LaserScan
Name: LaserScanMaster
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Expand All @@ -86,28 +82,72 @@ Visualization Manager:
Use Fixed Frame: true
Use rainbow: false
Value: true
- Alpha: 1
Autocompute Intensity Bounds: false
Autocompute Value Bounds:
Max Value: 10
Min Value: -10
Value: true
Axis: Z
Channel Name: intensity
Class: rviz/LaserScan
Color: 255; 255; 255
Color Transformer: Intensity
Decay Time: 0
Enabled: true
Invert Rainbow: false
Max Color: 252; 233; 79
Max Intensity: 2763
Min Color: 239; 41; 41
Min Intensity: 360
Name: LaserScanSubscriber
Position Transformer: XYZ
Queue Size: 10
Selectable: true
Size (Pixels): 3
Size (m): 0.009999999776482582
Style: Points
Topic: /laser_1/scan_Subscriber0
Unreliable: false
Use Fixed Frame: true
Use rainbow: false
Value: true
- Class: rviz/TF
Enabled: true
Filter (blacklist): ""
Filter (whitelist): ""
Frame Timeout: 15
Frames:
All Enabled: true
All Enabled: false
laser_1:
Value: true
laser_1_Subscriber0:
Value: true
laser_1_Subscriber0_body_link:
Value: true
laser_1_Subscriber0_mount_link:
Value: false
laser_1_body_link:
Value: true
laser_1_mount_link:
Value: false
reference_link:
Value: true
Marker Alpha: 1
Marker Scale: 0.5
Marker Scale: 0.25
Name: TF
Show Arrows: true
Show Axes: true
Show Names: true
Tree:
laser_1_mount_link:
laser_1_body_link:
laser_1:
{}
reference_link:
laser_1_Subscriber0_mount_link:
laser_1_Subscriber0_body_link:
laser_1_Subscriber0:
{}
laser_1_mount_link:
laser_1_body_link:
laser_1:
{}
Update Interval: 0
Value: true
- Alpha: 0.5
Expand All @@ -124,6 +164,19 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
laser_1_Subscriber0:
Alpha: 1
Show Axes: false
Show Trail: false
laser_1_Subscriber0_body_link:
Alpha: 1
Show Axes: false
Show Trail: false
Value: true
laser_1_Subscriber0_mount_link:
Alpha: 1
Show Axes: false
Show Trail: false
laser_1_body_link:
Alpha: 1
Show Axes: false
Expand All @@ -133,6 +186,10 @@ Visualization Manager:
Alpha: 1
Show Axes: false
Show Trail: false
reference_link:
Alpha: 1
Show Axes: false
Show Trail: false
Name: RobotModel
Robot Description: robot_description
TF Prefix: ""
Expand All @@ -144,17 +201,17 @@ Visualization Manager:
Marker Topic: /laser_1/active_zoneset_markers
Name: MarkerArray
Namespaces:
active zoneset safety1 min:+11.0 max:+30.0: true
active zoneset safety1 min:-50.0 max:+10.0: true
active zoneset warn1 min:+11.0 max:+30.0: true
active zoneset warn1 min:-50.0 max:+10.0: true
"active zoneset safety1 ": true
"active zoneset safety1_Sub0 ": true
"active zoneset warn1 ": true
"active zoneset warn1_Sub0 ": true
Queue Size: 100
Value: true
Enabled: true
Global Options:
Background Color: 48; 48; 48
Default Light: true
Fixed Frame: laser_1_mount_link
Fixed Frame: reference_link
Frame Rate: 30
Name: root
Tools:
Expand All @@ -178,33 +235,33 @@ Visualization Manager:
Views:
Current:
Class: rviz/Orbit
Distance: 3.5317435264587402
Distance: 2.4475436210632324
Enable Stereo Rendering:
Stereo Eye Separation: 0.05999999865889549
Stereo Focal Distance: 1
Swap Stereo Eyes: false
Value: false
Field of View: 0.7853981852531433
Focal Point:
X: 0.1902836561203003
Y: -0.0010642623528838158
Z: -0.5996174812316895
X: 0
Y: 0
Z: 0
Focal Shape Fixed Size: true
Focal Shape Size: 0.05000000074505806
Invert Z Axis: false
Name: Current View
Near Clip Distance: 0.009999999776482582
Pitch: 0.7547971606254578
Pitch: 0.7150002121925354
Target Frame: <Fixed Frame>
Yaw: 0.6699999570846558
Value: Orbit (rviz)
Yaw: 4.70818567276001
Saved: ~
Window Geometry:
Displays:
collapsed: false
Height: 752
Hide Left Dock: false
collapsed: true
Height: 1025
Hide Left Dock: true
Hide Right Dock: true
QMainWindow State: 000000ff00000000fd00000004000000000000016b0000024dfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005d00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073010000003f0000024d000000cc00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000010f0000024ffc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003e0000024f000000a900fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000005a00000003ffc0100000002fb0000000800540069006d00650100000000000005a00000027500fffffffb0000000800540069006d006501000000000000045000000000000000000000042f0000024d00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
QMainWindow State: 000000ff00000000fd00000004000000000000015600000362fc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000005c00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c006100790073000000003d00000362000000c900fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000014600000362fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000003d00000362000000a400fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000003ffc0100000002fb0000000800540069006d0065010000000000000780000002eb00fffffffb0000000800540069006d00650100000000000004500000000000000000000007800000036200000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000
Selection:
collapsed: false
Time:
Expand All @@ -213,6 +270,6 @@ Window Geometry:
collapsed: false
Views:
collapsed: true
Width: 1440
X: 273
Y: 33
Width: 1920
X: 0
Y: 27
Binary file added img/Master_and_Subscribers.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading