Hi,
I am trying to run the following command based on the gihub src: GitHub - husarion/tutorial_pkg.
roslaunch tutorial_pkg tutorial_8.launch use_rosbot:=false use_gazebo:=true
However, I am getting the below errors. How can I fix this (e.g. how to install frontier_exploration)? I’d appreciate any help.
ERROR: cannot launch node of type [frontier_exploration/explore_client]: frontier_exploration
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/pc/ros_workspace/src
ROS path [2]=/opt/ros/kinetic/share
ERROR: cannot launch node of type [frontier_exploration/explore_server]: frontier_exploration
ROS path [0]=/opt/ros/kinetic/share/ros
ROS path [1]=/home/pc/ros_workspace/src
ROS path [2]=/opt/ros/kinetic/share
This means that you do not have frontier_exploration
package installed.
It come preinstalled on ROSbot and also on our virtual machine image, in any other case you can install it with:
sudo apt install ros-kinetic-frontier-exploration
Regards,
Łukasz
Thanks. It works now. I have one more question. When rviz opened up and I added all the objects with the correct topics, I see nothing - no map, laser scans, etc… Why is nothing showing up? Is there something I need to do in either Gazebo or Rviz to get this working?
@lukasz.mitka Hi. Are you able to answer my question above please? Also, I did find some warnings as shown below.
[ WARN] [1544334371.027983498, 2918.770000000]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist… canTransform returned after 2918.77 timeout was 0.1.
[ WARN] [1544334580.912043136, 3126.000000000]: Map update loop missed its desired rate of 2.5000Hz… the loop actually took 0.4200 seconds
Hello geasrmotion789,
Sorry for the late reply.
First warning that you mention is related to tf frames publications.
In rviz
add the TF
visualization and check if all frames are published correctly. Please tell me if there are any errors on TF
object.
Regards,
Łukasz
@lukasz.mitka
I don’t see any errors in TF as shown below. What do you suggest?
Map seems to be not generated. Were you successful on running previous tutorials, e.g. tutorial_7.launch
or tutorial_6.launch
?
@lukasz.mitka No I wasn’t.
Each tutorial is based on previous one. It will be much easier to debug starting with easier ones.
Please go through each tutorial, beginning from the first one and post here first problem that you encounter.
Regards,
Łukasz
@lukasz.mitka
I just want to see tutorial_8 working without doing the work right now. Do you have the entire ros_workspace I can just download and get it working?
I just want to see the simulator working first before I actually purchase the husarion core.
The tutorial_pkg
and rosbot_description
packages are all that is required to run tutorial.
One more thing to check is the GPU plugin for Gazebo. Some GPUs, mainly the integrated ones have problems with proper rendering of laser scanner.
- Go to file
rosbot.gazebo
located in rosbot_description/src/rosbot_description/urdf
- Comment out lines 119 -149 with
<!--
to begin comment and -->
to end comment
- Uncomment lines 152-182 by deleting
<!--
and -->
- Run simulation again
Please tell me if that helps.
Regards,
Łukasz
@lukasz.mitka Thank you very much. It works now.
- How could I make the robot move faster though?
- Also how could I open an existing map and then continue navigation from that?
- Lastly, I see that the robot stops moving at a certain point as shown below. Why is this so, and how could I fix it?
[ERROR] [1544848716.070758884, 3139.710000000]: Aborting because a valid plan could not be found. Even after executing all recovery behaviors
[ERROR] [1544848716.071447911, 3139.710000000]: Failed to move
@lukasz.mitka
For 2, I noticed that I have to replace the gmapping code in the tutorial_8.launch:
<node pkg="gmapping" type="slam_gmapping" name="gmapping">
<param name="base_frame" value="base_link"/>
<param name="odom_frame" value="odom" />
<param name="delta" value="0.01"/>
<param name="xmin" value="-10"/>
<param name="ymin" value="-10"/>
<param name="xmax" value="10"/>
<param name="ymax" value="10"/>
</node>
with the amcl code from the link you sent:
<!-- Localization -->
<node pkg="amcl" type="amcl" name="amcl" output="screen">
<remap from="scan" to="/scan"/>
<param name="odom_frame_id" value="odom"/>
<param name="odom_model_type" value="diff-corrected"/>
<param name="base_frame_id" value="base_link"/>
<param name="update_min_d" value="0.5"/>
<param name="update_min_a" value="1.0"/>
</node>
because the saved map didn’t show up in rviz. Why is this so, and how can I get this to work with the gmapping code instead of the amcl?
The gmpping
and amcl
nodes can not be used interchangeably, as they are for different use cases:
- The
gmapping
is tool for building a map with no prior data regarding it, this node also determines position of robot in frame of map during the process.
- The
amcl
node is for determining position in frame of previously known map, the map for amcl
must be provided by other node.
Typical workflow is:
- Start robot with
gmapping
and explore entire environment.
- While
gmapping
is still running, use map_saver
to save a map to file.
- Stop
gmapping
node
- Launch
amcl
and map_server
to start positioning robot relative to created map.
Regards,
Łukasz
1 Like