nav2d with Turtlebot and Asus Xtion Pro
Hi
I installed and tried the nav2d navigation package for my Turtlebot. I use an Asus Xtion as camera. When I try to run the files, I think everything goes well, but when I call 'rosservice call /StartMapping 3', I get the normal 'response:0', but nothing happens with the robot. Afterwards when I call 'rosservice call /StartExploration 2', I get also the same response, but in another terminal I find these errors: [ERROR] [1458556180.608578210]: Could not get robot position: "baselink" passed to lookupTransform argument sourceframe does not exist. [ERROR] [1458556180.608641217]: Exploration failed, could not get current position.
I modified the tutorial3 launch file as shown below (like I found it somewhere on this site):
<launch>
<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros2.yaml"/>
<arg name="base" value="$(optenv TURTLEBOT_BASE kobuki)"/> <!--create, roomba -->
<arg name="battery" value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/> <!--/proc/acpi/battery/BAT0 -->
<arg name="gui" default="true"/>
<arg name="stacks" value="$(optenv TURTLEBOT_STACKS hexagons)"/> <!-- circles, hexagons -->
<arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR asus_xtion_pro)"/> <!-- kinect, asus_xtion_pro -->
<!-- Fake laser -->
<node pkg="nodelet" type="nodelet" name="laserscan_nodelet_manager" args="manager"/>
<node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan"
args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet laserscan_nodelet_manager">
<param name="scan_height" value="10"/>
<param name="output_frame_id" value="/camera_depth_frame"/>
<param name="range_min" value="0.45"/>
<remap from="image" to="/camera/depth/image_raw"/>
<remap from="scan" to="/kinect_scan"/>
</node>
<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
<remap from="scan" to="base_scan"/>
<remap from="cmd_vel" to="cmd_vel_mux/input/teleop" />
<rosparam file="$(find nav2d_tutorials)/param/operator2.yaml"/>
<rosparam file="$(find nav2d_tutorials)/param/costmap2.yaml" ns="local_map" />
</node>
<!-- Start Mapper to genreate map from laser scans -->
<node name="Mapper" pkg="nav2d_karto" type="mapper">
<remap from="scan" to="base_scan"/>
<rosparam file="$(find nav2d_tutorials)/param/mapper2.yaml"/>
</node>
<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
<rosparam file="$(find nav2d_tutorials)/param/navigator2.yaml"/>
</node>
<node name="GetMap" pkg="nav2d_navigator" type="get_map_client" />
<node name="Explore" pkg="nav2d_navigator" type="explore_client" />
<node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client" />
<!-- RVIZ to view the visualization -->
<node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz" />
</launch>
I don't know much about ROS, and I'm very new to these software packages. Can someone take a look to these files (I included the tftree, the rqtdot file and the parameter files)
https://www.dropbox.com/sh/3iril8vujj94nxs/AADGGbyVWZIcf0s6zHiL0gjWa?dl=0
Have I forgotten an essential step? Do I have to run some other things?
Thanks!
Asked by BastiaanVDW on 2016-03-21 06:47:00 UTC
Comments
In your ros.yaml file, why is your laser frame also base_link? Also, I don't think you need to remap from scan to base_scan. That was only for the stage simulator.
Asked by pgigioli on 2016-03-21 13:20:24 UTC
The laser frame was indeed a mistake, I changed it with the real laser frame. After deleting the remapping, the turtlebot is still doing nothing...
Asked by BastiaanVDW on 2016-03-22 18:00:59 UTC
Keep the edits I suggested and also change the remapping of cmd_vel to "mobile_base/commands/velocity". This will send velocity commands directly to the mobile base. This should at least make the /StartMapping work.
Asked by pgigioli on 2016-04-04 10:20:26 UTC