node to randomly generate start and goal positions
Hello
I need to create an experiment in ROS. Using C++, I need to randomly generate 50 start and goal positions( validating they are not out of the world or map and not obstacles). For each start and goal scenario, I want to measure the path length and run time then save them in Excel file for example.
I did this experiment in c++ simulator, but in ROS, I do not know where should I start from, Using ROS, I can move rosbot2 in willow garage world by publishing start and goal in Terminal.
Do I need to implement a node? as https://wiki.ros.org/navigation/Tutor...
what about a node to send start? can I implement a node to do both(sending start and goal)?
Do you have any recommendations or useful tutorials to start from?
Can I include such a node in my navigation launch file?
This is my navigation launch file:
<launch>
<arg name="use_rosbot" default="false"/>
<arg name="use_gazebo" default="true"/>
<param if="$(arg use_gazebo)" name="use_sim_time" value="true"/>
<include file="$(find rosbot_description)/launch/rosbot_rviz.launch"/>
<arg name="map_file" default="$(find rosbot_navigation)/maps/willowgarage-refined.yaml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(arg map_file)" />
<node unless="$(arg use_rosbot)" pkg="tf" type="static_transform_publisher" name="map_odom_tf" args="0 0 0 0 0 0 map odom 100" />
<node pkg="move_base" type="move_base" name="move_base" output="screen">
<param name="base_global_planner" value="navfn/NavfnROS"/>
<param name="base_local_planner" value="base_local_planner/TrajectoryPlannerROS"/>
<param name="controller_frequency" value="10.0"/>
<rosparam file="$(find rosbot_navigation)/config/costmap_common_params.yaml" command="load" ns="global_costmap" />
<rosparam file="$(find rosbot_navigation)/config/costmap_common_params.yaml" command="load" ns="local_costmap" />
<rosparam file="$(find rosbot_navigation)/config/local_costmap_params.yaml" command="load" />
<rosparam file="$(find rosbot_navigation)/config/global_costmap_params.yaml" command="load" />
<rosparam file="$(find rosbot_navigation)/config/trajectory_planner.yaml" command="load" />
</node>
</launch>