Fixes type of port parameter in cfg files
The port parameter was declared as an int_t in the cfg files but in the
code it is expected to be a string. When the dynamic_reconfigure server
is started, the data type on the parameter server was changed from
string to int. This resulted in getParam of the release 1.2.0 to return
False effectively killing any respawn functionality.
Move stamping close to data reading.
Before this commit the scan message was stamped just before publishing the
data. In the LaserScan message of ros the timestamp in the header is
the acquisition time of the first ray in the scan.
safe feed time within the defined timeout
Update r2300.launch
fixed typo
Merge pull request #101 from PepperlFuchs/r2300_single_layer
R2300 single layer
Merge branch 'main' into r2300_single_layer
added config files for R2300 device family 7 (single layer)
default packet type is C (R2000)
added optional port parameter to yaml config files
Merge pull request #94 from MichaelGrupp/application_bitmap
Allow to set hmi_application_bitmap with dynamic_reconfigure
Merge branch 'main' into application_bitmap
Merge pull request #93 from MichaelGrupp/launch-args
Allow to disable RViz & pf_bringup in launch file.
Allow to disable RViz & pf_bringup in launch file.
This allows better integration in headless systems and robots that
already have a robot_state_publisher.
Allow to set hmi_application_bitmap
Merge pull request #99 from PepperlFuchs/fix_udp_port
Fix udp port
utilize port specified in config for UDP connection
Merge pull request #87 from wawanbreton/code_refactoring
Code refactoring
apply clang formatting
header only has function declaration
remove references to mutex after refactoring
Fixed missing include
Applied clang formatting
Code cleaning and minor optimizations
Added cpp files for each header when possible
Splitted existing cpp files to match headers
Splitted headers to have a single class by file
Moved sources to src folder
Contributors: Erwan MATHIEU, Harsh Deshpande, Kai Franke, Michael Grupp, Valerio Magnago
Merge pull request #31 from PepperlFuchs/fix-dyn-params
fix ip_mode and layer_on
fix ip_mode and layer_on
Merge pull request #26 from MilanoTechnicalGroupInc/r2000_fix
R2000 fix
Fix parsing TCP streams/packets
UDP transport puts one PSDF packet per UDP packet; TCP jams all PSDF packets into a single stream which is often delivered in chunks that don't match the size of the actual TCP packets.
Here, we make two changes to account for this:
1. Restructure the parser to parse an arbitrary number of packets iteratively from its buffer (avoid multiple recursion, though it's probably fine).
2. Restructure the writer to persist any unused bytes from the previous parse and prepend them to the next packet that comes in over the network.
Validate buffer size based on packet header
Original implementation compared the computed data size (based on sizes in the packet header) to the buffer size less the nominal size of the known packet header structure. However, some (I guess older?) R2000s use a smaller packet header (60 bytes vs 76). Trying to parse packets from these devices results in almost universal failure, the original condition ends up being "does the packet have at least 16 extra bytes at the end" to which the answer is usually "no" (except if the packet is part of a TCP stream and has the beginning of the next PFSDP packet immediately after it in the buffer).
This code is still not ideal, as the first few data bytes are also parsed into the header in that case, so we'll end up with some header fields that might be invalid (with no indication to the user). It also doesn't modify the outer check (in include/pf_driver/pf/pf_parser.h) that verifies that there's at least as much data as the expected header size, so in rare cases (packets with only a few points) we may drop (or delay) those packets; however that should be fairly uncommon (packet sizes are based on scan parameters and AFAICT tend to avoid nearly empty packets).
Default to packet type C for R2000
Basically no reason to use type A; we know how to parse all three types, A and C use the same space, and C gives us additional information.
Don't alter the default for R2300, (which I believe means it uses type C1?)
This also requires us to add the necessary arguments to request_handle_{tcp,udp} in the PFSDP protocol header.
Refactor HTTP get calls in request_handle_{tcp,udp}
- Refactor HTTP get call to allow passing std::map in addition to initializer list (initializer lists are great for quick use, but make constructing complicated queries difficult, since they are immutable)
-> Expect this to come in handy if additional arguments to the handle request are added later (e.g. start angle, max number of points per scan, etc)
- Properly construct query based on which arguments have been specified
Parse R2000 packet type B properly
Useful code was commented out for some reason. Changing it slightly to
match the other packet types and for more efficiency.
Publish echo amplitudes as intensities in ROS LaserScan messages
Except for R2000 packet type A, which doesn't include intensity
Merge pull request #27 from MilanoTechnicalGroupInc/param_fix
Minor fixes for dynamic reconfigure on R2000
Only set up one dynamic reconfigure server per node
Otherwise only the later of the two is active (I think?) and we end up unable to use dynamic reconfigure on R2000.
Also move the server setup to a more sensible place, now that this is
getting more complicated.
Fix a few R2000 config parameters
several "value" fields weren't appropriately set (spaces, or longer names used instead), and one of the "Watchdog" enum values had a copy/paste error.
Fixed setting scan output config
Merge pull request #24 from MilanoTechnicalGroupInc/buildfix
Fix clean build
Fix clean build
Missing dependencies caused fresh builds to fail because the message
headers weren't generated until too late
Merge pull request #21 from PepperlFuchs/cleanup
Added dynamic reconf for R2000
Added dynamic reconf for R2000
Merge pull request #20 from PepperlFuchs/cleanup
Cleanup