Skip to content

Commit

Permalink
Use math.radians() to compute default values in launch-files
Browse files Browse the repository at this point in the history
  • Loading branch information
martiniil committed Jan 31, 2022
1 parent 4b6148e commit 75599b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
9 changes: 4 additions & 5 deletions launch/bringup.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
is the prefix for the urdf description. -->
<arg name="tf_prefix" default="laser_1" />

<!-- Start angle of measurement in radian
https://github.com/ros2/launch/pull/557 would allow "$(eval math.radians(-137.4))"-->
<arg name="angle_start" default="-2.398082392240209" />
<!-- Start angle of measurement in radian -->
<arg name="angle_start" default="$(eval 'radians(-137.4)')" />

<!-- End angle of measurement in radian -->
<arg name="angle_end" default="2.398082392240209" />
<arg name="angle_end" default="$(eval 'radians(137.4)')" />

<!-- Publishing of intensities -->
<arg name="intensities" default="false" />

<!-- Scan resolution in radian -->
<arg name="resolution" default="0.0017453292519943296" />
<arg name="resolution" default="$(eval 'radians(0.1)')" />

<!-- IP-Address of host machine -->
<arg name="host_ip" default="auto" />
Expand Down
6 changes: 3 additions & 3 deletions launch/psen_scan_v2.launch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
<arg name="tf_prefix" default="laser_1" />

<!-- Start angle of measurement in radian -->
<arg name="angle_start" default="-2.398082392240209" />
<arg name="angle_start" default="$(eval 'radians(-137.4)')" />

<!-- End angle of measurement in radian -->

<arg name="angle_end" default="2.398082392240209" />
<arg name="angle_end" default="$(eval 'radians(137.4)')" />

<!-- Publishing of intensities -->
<arg name="intensities" default="false" />

<!-- Scan resolution in radian -->
<arg name="resolution" default="0.0017453292519943296" />
<arg name="resolution" default="$(eval 'radians(0.1)')" />

<!-- IP-Address of host machine -->
<arg name="host_ip" default="auto" />
Expand Down

0 comments on commit 75599b1

Please sign in to comment.