Closed meyerls closed 4 years ago
It seems the problem was caused by the lack of "depthimage_to_laserscan/DepthImageToLaserScanNodelet".
Try this
sudo apt install ros-melodic-depthimage-to-laserscan -y
Or maybe this issue will help:https://github.com/rajanya/comprobfall2018-hw3/issues/1
Nice, thanks! sudo apt install ros-melodic-depthimage-to-laserscan -y
worked and no errors are thrown.
But the main problem controlling the Turtlebot in gazebo with turtlebot_teleop does not work.
It seems that it publishes to the correct topic (/mobile_base/commands/velocity), but nothing happens in gazebo.
According to the launch file, keyboard_teleop.launch (of turtlebot_teleop)
<launch>
<!-- turtlebot_teleop_key already has its own built in velocity smoother -->
<node pkg="turtlebot_teleop" type="turtlebot_teleop_key" name="turtlebot_teleop_keyboard" output="screen">
<param name="scale_linear" value="0.5" type="double"/>
<param name="scale_angular" value="1.5" type="double"/>
<remap from="turtlebot_teleop_keyboard/cmd_vel" to="cmd_vel_mux/input/teleop"/>
</node>
</launch>
The messages should be published to topic /cmd_vel_mux/input/teleop
, instead of /mobile_base/commands/velocity
.
If you expect to receive the messages from /mobile_base/commands/velocity
, maybe you need to remap the output topic. Try modify the launch file keyboard_teleop.launch
# <remap from="turtlebot_teleop_keyboard/cmd_vel" to="cmd_vel_mux/input/teleop"/>
<remap from="turtlebot_teleop_keyboard/cmd_vel" to="/mobile_base/commands/velocit"/>
You can use this command to locate the launch file: locate keyboard_teleop.launch
Sadly this does not work. For both cases the messages are published by the correct topic and I checked also if the values are changing. Do you have some hint how to check where the Turtlebot in gazebo is subscribing the turtlebot_teleop_keyboard topic?
Well, you can use rqt_graph
to view active topics.
Oh nice this might be the problem! It seems as mobile_base does not forward the messages to gazebo and Turtlebot_teleop_keyboard doesn't even publish to cmd_vel_mux or mobile_base. Thats strange, both topic print value for roslaunch turtlebot_teleop keyboard_teleop.launch
and roslaunch turtlebot_teleop keyboard_teleop.launch
. Beside this I am able to control my real Turtlebot with these commands.
The problem appears to be in kobuki_gazebo.urdf.xacro
, where the plugin libgazebo_ros_kobuki.so
is being loaded. I don't think this actually exists in Melodic, not sure why it doesn't throw an error. You can add it by copying the kobuki_gazebo_plugins folder form here. Once this is compiled, it should start working.
It works fine after installing kobuki_desktop and yocs_velocity_smoother
And before those, I also install ros-melodic-joy
Hello!
I know this might not be a real issue for this repo, but it seems as you guys are the only one talking about ROS Melodic and Turtlebot 2.
I've tried to start gazebo to simply control the turtlebot with the keyboard. So I executed
roslaunch turtlebot_gazebo turtlebot _world.launch
androslaunch turtlebot_teleop keyboard_teleop.launch
. But it seems as this would not work. Gazebo throws some errors concerning the depth camera etc., but i think this is not the actual problem.Does anyone can help me?
[ERROR] [1567606707.000028044, 0.190000000]: Failed to load nodelet [/depthimage_to_laserscan] of type [depthimage_to_laserscan/DepthImageToLaserScanNodelet] even after refreshing the cache: According to the loaded plugin descriptions the class depthimage_to_laserscan/DepthImageToLaserScanNodelet with base class type nodelet::Nodelet does not exist. Declared types are depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image kobuki_bumper2pc/Bumper2PcNodelet kobuki_node/KobukiNodelet kobuki_safety_controller/SafetyControllerNodelet nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2 turtlebot_follower/TurtlebotFollower yocs_cmd_vel_mux/CmdVelMuxNodelet [ERROR] [1567606707.000133371, 0.190000000]: The error before refreshing the cache was: According to the loaded plugin descriptions the class depthimage_to_laserscan/DepthImageToLaserScanNodelet with base class type nodelet::Nodelet does not exist. Declared types are depth_image_proc/convert_metric depth_image_proc/crop_foremost depth_image_proc/disparity depth_image_proc/point_cloud_xyz depth_image_proc/point_cloud_xyz_radial depth_image_proc/point_cloud_xyzi depth_image_proc/point_cloud_xyzi_radial depth_image_proc/point_cloud_xyzrgb depth_image_proc/register image_proc/crop_decimate image_proc/crop_nonZero image_proc/crop_non_zero image_proc/debayer image_proc/rectify image_proc/resize image_publisher/image_publisher image_rotate/image_rotate image_view/disparity image_view/image kobuki_bumper2pc/Bumper2PcNodelet kobuki_node/KobukiNodelet kobuki_safety_controller/SafetyControllerNodelet nodelet_tutorial_math/Plus pcl/BAGReader pcl/BoundaryEstimation pcl/ConvexHull2D pcl/CropBox pcl/EuclideanClusterExtraction pcl/ExtractIndices pcl/ExtractPolygonalPrismData pcl/FPFHEstimation pcl/FPFHEstimationOMP pcl/MomentInvariantsEstimation pcl/MovingLeastSquares pcl/NodeletDEMUX pcl/NodeletMUX pcl/NormalEstimation pcl/NormalEstimationOMP pcl/NormalEstimationTBB pcl/PCDReader pcl/PCDWriter pcl/PFHEstimation pcl/PassThrough pcl/PointCloudConcatenateDataSynchronizer pcl/PointCloudConcatenateFieldsSynchronizer pcl/PrincipalCurvaturesEstimation pcl/ProjectInliers pcl/RadiusOutlierRemoval pcl/SACSegmentation pcl/SACSegmentationFromNormals pcl/SHOTEstimation pcl/SHOTEstimationOMP pcl/SegmentDifferences pcl/StatisticalOutlierRemoval pcl/VFHEstimation pcl/VoxelGrid stereo_image_proc/disparity stereo_image_proc/point_cloud2 turtlebot_follower/TurtlebotFollower yocs_cmd_vel_mux/CmdVelMuxNodelet [FATAL] [1567606707.000422297, 0.190000000]: Failed to load nodelet '/depthimage_to_laserscan
of typedepthimage_to_laserscan/DepthImageToLaserScanNodelet
to managerlaserscan_nodelet_manager' [depthimage_to_laserscan-10] process has died [pid 16492, exit code 255, cmd /opt/ros/melodic/lib/nodelet/nodelet load depthimage_to_laserscan/DepthImageToLaserScanNodelet laserscan_nodelet_manager image:=/camera/depth/image_raw scan:=/scan __name:=depthimage_to_laserscan __log:=/home/robonav/.ros/log/db118a78-cf1e-11e9-a8b8-f45c89bf254d/depthimage_to_laserscan-10.log]. log file: /home/robonav/.ros/log/db118a78-cf1e-11e9-a8b8-f45c89bf254d/depthimage_to_laserscan-10*.log