SICKAG / sick_scan_xd

Based on the sick_scan drivers for ROS1, sick_scan_xd merges sick_scan, sick_scan2 and sick_scan_base repositories. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2).
Apache License 2.0
104 stars 84 forks source link

Question: how to change fieldset #394

Open akashjinandra opened 1 week ago

akashjinandra commented 1 week ago

Hello, I am using ROS 1 Noetic, Ubuntu 20 and SIck Tim 781, I am wondering how to change the fieldset. It looks like in RVIZ it defaults to 1 image However when i didn't see explicit instructions on what to send in order to change the fieldset. After digging around it seems like maybe with the ColaMsg service request it may be possible. But looking calling the service with this: rosservice call /sick_tim_7xx/ColaMsg "{request: 'sRA LIDinputstate 2'}" However I get an error saying there is a mismatch: image

rostest commented 1 week ago

Thank you for your feedback. Use SOPAS ET to configure the fields and fieldset. We will take a closer look at the LIDinputstate telegrams.

akashjinandra commented 1 week ago

Hello and thank you for your response. In the SOPAS ET, it shows an option to change the fieldset either through a digital input or via a SOPAS telegram. See this image: image

Therefore I think through the ColaMsg I think it should be possible, I just don't know enough about the syntax of the telegram to send the fieldset change.

akashjinandra commented 1 week ago

when looking at the manual, it shows this: image All the sRN commands seem to work, but none of the sWN commands work, we get an error: image And then the service call hangs. and the program will not accept anymore service calls.

rostest commented 6 days ago

Thanks for more information. The sick_scan_xd driver currently supports only the default fieldset selection mode, i.e. setting the active fieldset via digital inputs (FieldSetSelectionMethod=0). LIDinputstate telegrams are received by sick_scan_xd to monitor and update the active fieldset, but they are currently not published.

The next release will improve the field evaluation for TiM7xx and TiM7xxS lidars:

The next release is scheduled for publication within this month.

akashjinandra commented 5 days ago

Thanks for more information. The sick_scan_xd driver currently supports only the default fieldset selection mode, i.e. setting the active fieldset via digital inputs (FieldSetSelectionMethod=0). LIDinputstate telegrams are received by sick_scan_xd to monitor and update the active fieldset, but they are currently not published.

The next release will improve the field evaluation for TiM7xx and TiM7xxS lidars:

  • LIDinputstate telegrams will be published as ROS messages in topic /sick_tim_7xx/lidinputstate.
  • FieldSetSelectionMethod and ActiveFieldSet options can be set in the launch file. By default the active field set can be set by digital inputs (FieldSetSelectionMethod=0). With the new option (FieldSetSelectionMethod=1) the active fieldset can be configured directly in the launchfile. Refer to the TiM 781 user manual and the telegram listing for full details of the fieldset options. Make sure that the latest firmware is installed on your lidar to use these options.

The next release is scheduled for publication within this month.

Hello, thank you for your reply. As you can see from my screenshot, the FieldSetSelection Method is already set to 1, I configured this through the SOPAS ET. image I also already posted a screenshot of the TiM 781 User Manual in my posting, showing the commands, however in my screenshot, it did not work, when I literally copy and pasted the command. image

rostest commented 2 days ago

Thanks for your reply. The upcoming release 3.6 will add two ros services to read and write the FieldSetSelectionMethod and ActiveFieldSet options. Please use the new services to read or change the fieldset configuration.

Example call for ROS1:

rosservice call /sick_tim_7xx/FieldSetRead "{}" # returns field_set_selection_method and active_field_set
rosservice call /sick_tim_7xx/FieldSetWrite "{field_set_selection_method_in: -1, active_field_set_in: 1}" # write active_field_set

Example call for ROS2:

ros2 service call /FieldSetRead sick_scan_xd/srv/FieldSetReadSrv "{}" # returns field_set_selection_method and active_field_set
ros2 service call /FieldSetWrite sick_scan_xd/srv/FieldSetWriteSrv "{field_set_selection_method_in: -1, active_field_set_in: 1}" # write active_field_set

Parameter summary:

Initial values for field_set_selection_method and active_field_set can be configured in the launch file, e.g.:

<param name="active_field_set" type="int" value="-1"/> <!-- set ActiveFieldSet at startup: -1 = do not set (default), index of active field otherwise -->
<param name="field_set_selection_method" type="int" value="-1"/> <!-- set FieldSetSelectionMethod at startup: -1 = do not set (default), 0 = active field selection by digital inputs, 1 = active field selection by telegram -->

These options will be supported in the next sick_scan_xd release 3.6.

akashjinandra commented 2 days ago

Hello and thank you for your reply. This should solve my problem, I would be willing to beta test the feature for you as well if you need any help.