Skip to content

Commit

Permalink
Merge pull request #10 from ipa320/rings
Browse files Browse the repository at this point in the history
Fixed angle_min and angle_max
  • Loading branch information
hsd-dev authored Sep 19, 2019
2 parents 88cdaa1 + 54c4157 commit 2207f30
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions pf_driver/include/pf_driver/pf_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ class PF_Interface : public HardwareInterface<ConnectionType>, public DataParser
scanmsg.header.frame_id = frame_id + "_" + std::to_string(i);
scanmsg.header.stamp = ros::Time::now();

std::uint32_t fov = std::atof(parameters["angular_fov"].c_str()) / 2.0;
scanmsg.angle_min = -fov * M_PI / 180;
scanmsg.angle_max = +fov * M_PI / 180;
float fov = std::atof(parameters["angular_fov"].c_str()) / 2.0;
scanmsg.angle_min = -fov * M_PI / 180.0;
scanmsg.angle_max = +fov * M_PI / 180.0;

scanmsg.angle_increment = (fov * M_PI / 90) / float(scandata.distance_data.size());
scanmsg.time_increment = 1 / 35.0f / float(scandata.distance_data.size());
Expand Down
8 changes: 4 additions & 4 deletions pf_driver/launch/r2300_allscans.launch
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<?xml version="1.0"?>
<launch>
<include file="$(find pf_driver)/launch/r2300.launch"/>
<node pkg="tf" type="static_transform_publisher" name="ring1" args="0 0 0 0 0 0.0785 /scan /scan_0 10" />
<node pkg="tf" type="static_transform_publisher" name="ring2" args="0 0 0 0 0 0.0262 /scan /scan_1 10" />
<node pkg="tf" type="static_transform_publisher" name="ring3" args="0 0 0 0 0 -0.0785 /scan /scan_2 10" />
<node pkg="tf" type="static_transform_publisher" name="ring4" args="0 0 0 0 0 -0.0262 /scan /scan_3 10" />
<node pkg="tf" type="static_transform_publisher" name="ring1" args="0 0 0 0 0.0785 0 /scan /scan_0 10" />
<node pkg="tf" type="static_transform_publisher" name="ring2" args="0 0 0 0 0.0262 0 /scan /scan_1 10" />
<node pkg="tf" type="static_transform_publisher" name="ring3" args="0 0 0 0 -0.0785 0 /scan /scan_2 10" />
<node pkg="tf" type="static_transform_publisher" name="ring4" args="0 0 0 0 -0.0262 0 /scan /scan_3 10" />
<!--node name="rvizLocal" pkg="rviz" type="rviz" respawn="false" output="screen" args= "-d $(find pf_driver)/rviz/4layer.rviz" required="true" /-->
</launch>

Expand Down

0 comments on commit 2207f30

Please sign in to comment.