-
Notifications
You must be signed in to change notification settings - Fork 1
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
Generalized Lidar Simulator PR #78
Changes from 1 commit
fabddee
db8a425
5cb1ea0
2a66b33
313a88e
49bee56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,42 +4,36 @@ | |
<arg name="cad_file" default="$(find cpt_selective_icp)/resources/cla.json" /> | ||
<arg name="lidar_settings" default="$(find cpt_matching_algorithms)/config/sim_lidar_config.yaml" /> | ||
<arg name="SimMarkerLidar" value="true" /> | ||
<arg name="lidar_frame" value="marker_pose" /> | ||
<arg name="lidar_frame" value="simulated_lidar_pose" /> | ||
|
||
<node name="lidar_simulator" pkg="cpt_matching_algorithms" type="sim_lidar_node" output="screen" launch-prefix="tmux split-window"> | ||
<rosparam command="load" file="$(arg lidar_settings)" /> | ||
|
||
<!-- If FixLidarScan is true, the scan does not move at all but stays centered (fixed) at the origin, if FixLidarScan is false, the scan moves with the marker as origin --> | ||
<param name="FixLidarScans" value="false" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please add a comment here that explains this parameter better. Usually, the launch-file is what people who just want to use your code will look into first, because it gives a high-level interface to your nodes. So it is important to add explanations to parameters that are not straightforward to understand. |
||
<param name="cadTopic" value="/mesh_publisher/mesh_out" /> | ||
<param name="lidarFrame" value="$(arg lidar_frame)" /> | ||
</node> | ||
|
||
<group if ="$(arg SimMarkerLidar)"> | ||
<node name="marker_pose" | ||
pkg="cpt_utils" | ||
type="position_marker_in_mesh.py"> | ||
type="position_marker_in_mesh.py" | ||
if ="$(arg SimMarkerLidar)"> | ||
<param name="marker_parent_frame" value="map" /> | ||
<param name="marker_frame_name" value="$(arg lidar_frame)" /> | ||
<param name="marker_name" value="Simulated LiDAR" /> | ||
</node> | ||
</group> | ||
<group unless ="$(arg SimMarkerLidar)"> | ||
<node pkg="tf" type="static_transform_publisher" name="SimFixLidar" args="-2 2 1 0 0 0.724872 0.6894984 map $(arg lidar_frame) 100"/> | ||
</group> | ||
|
||
<node name="mesh_positioning" | ||
pkg="cpt_selective_icp" | ||
type="position_cad_with_marker.py"> | ||
<param name="marker_parent_frame" value="map" /> | ||
<param name="marker_frame_name" value="marker" /> | ||
</node> | ||
<node pkg="tf" type="static_transform_publisher" name="SimFixLidar" args="-2 2 1 0 0 0.724872 0.6894984 map $(arg lidar_frame) 100" unless ="$(arg SimMarkerLidar)"/> | ||
|
||
<node pkg="rosservice" type="rosservice" name="cad_trigger" args="call /mesh_publisher/publish {}" launch-prefix="bash -c 'sleep 2; $0 $@' "/> | ||
<node pkg="tf" type="static_transform_publisher" name="mesh_positioning" args="0 0 0 0 0 1 1 marker map 100"/> | ||
<node name="mesh_publisher" pkg="cpt_utils" type="mesh_publisher_node"> | ||
<param name="publish_on_start" value="false"/> | ||
<param name="default_filename" value="$(arg cad_file)"/> | ||
<param name="frame_name" value="marker"/> | ||
</node> | ||
|
||
<node pkg="tf" type="static_transform_publisher" name="laser" args="100 0 0 0 0 0 1 /lidar /rslidar 100"/> | ||
<node pkg="tf" type="static_transform_publisher" name="laser" args="0 0 0 0 0 0 1 /lidar /rslidar 100"/> | ||
|
||
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find cpt_matching_algorithms)/config/rviz_movable_lidar_sim.yaml" /> | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the revised version, sorry for the inconvenience. SimLidar now uses the tf transformation between map (due to visualization reasons, switching to "marker" should be possible with a constant transformation in SimLidar) and marker_pose (frame from the interactive marker). I tried to simplify the code of SimLidar and to regulate certain things already in the launch file (constant pose, etc.) to become more modular.