ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to run amcl_demo in gazebo+RViz?

asked 2016-05-08 22:17:58 -0500

zzzZuo gravatar image

updated 2016-05-08 22:24:50 -0500

Hi ,every one. Now, I want to run amcl_demo in gazebo in my ROS(indigo + ubuntu14.04 + kinect1)

roslaunch turtlebot_gazebo turtlebot_world.launch
roslaunch turtlebot_rviz_launchers view_navigation.launch
roslaunch turtlebot_gazebo amcl_demo.launch map_file:=database/test0.yaml

but after I ran

roslaunch turtlebot_gazebo amcl_demo.launch map_file:=database/test0.yaml

the terminal output some error info:

'[ERROR] [1462761356.977949263]: Map_server could not open database/test0.yaml.
 [ INFO] [1462761357.305058954, 74.440000000]: No matching device found.... waiting for devices. Reason: std::string      openni2_wrapper::OpenNI2Driver::resolveDeviceURI(const string&) @ /tmp/binarydeb/ros-indigo-openni2-camera- 0.2.5/src/openni2_driver.cpp @ 631 : Invalid device number 1, there are 0 devices connected.
[map_server-10] process has died [pid 11399, exit code 255, cmd /home/zuo/ros/ws/devel/lib/map_server/map_server database/test0.yaml __name:=map_server __log:=/home/zuo/.ros/log/94c0a0f6-158e-11e6-b559-005a39d84f79/map_server-10.log].
log file: /home/zuo/.ros/log/94c0a0f6-158e-11e6-b559-005a39d84f79/map_server-10*.log'

they said "No matching device found",but when I could ran gmapping in gazebo, it's OK!

roslaunch turtlebot_gazebo turtlebot_world.launch
roslaunch turtlebot_rviz_launchers view_navigation.launch
roslaunch turtlebot_gazebo gmapping_demo.launch

So , what's problem with me? Thanks for your help!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-05-09 01:49:01 -0500

Orhan gravatar image

updated 2016-05-10 01:12:06 -0500

Try adding full path of your map file. You can see launch file here.

roslaunch turtlebot_gazebo amcl_demo.launch map_file:=/home/zuo/my_maps/some_map.yaml

EDIT: Not a problem, I'm using Tanzanian English too :) You can follow link (the file is in above link) in my answer, and look map_file parameter. If it's searching package like this:

"$(find some_package)/$(arg map_file)"

you can use your folder's path in your <workspace>/src/<PATH> directly. If you didn't edit default lanunch file (the file is in above link), It's using full path(or full path in TURTLEBOT_MAP_FILE environment variable default.).You can also create your own launch file.

edit flag offensive delete link more

Comments

I'm afraid it's not a path error.I try full path,but it also output next error info

process has died [pid 24354, exit code 255

In any case, thanks for your time.

zzzZuo gravatar image zzzZuo  ( 2016-05-09 03:03:59 -0500 )edit

True one is full path. Leave path full before finding other problem.

Orhan gravatar image Orhan  ( 2016-05-09 03:38:50 -0500 )edit

I have used roslaunch gmapping in gazebo by relative path,and it's right.I think it maybe something wrong in launch file or .bashrc file.

zzzZuo gravatar image zzzZuo  ( 2016-05-09 20:53:30 -0500 )edit

What's different on environment when use amcl_demo and gmapping in gazebo?And I'm so sorry for my english,hope you could understand. hhhhhhhhhhLOL

zzzZuo gravatar image zzzZuo  ( 2016-05-09 20:55:58 -0500 )edit

I've edited my answer.

Orhan gravatar image Orhan  ( 2016-05-10 01:06:53 -0500 )edit
0

answered 2020-08-09 01:05:17 -0500

Sanjuna Mariam Mathews gravatar image

Solution of the error : No matching device found.... waiting for devices

There may be permission issue with KInect. That's why it's showing like no devices found. In gazebo , the camera node publishes image topic. But in real hardware it is done by Openni.launch (Kinect launch ) file. So we need to give permission to the given port. Give the following commands - $ lsusb

Your device will be listed $ sudo chmod 777 -R /dev/bus/usb

You have given permission to the port

$ roslaunch openni_launch openni.launch

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-05-08 22:17:58 -0500

Seen: 1,484 times

Last updated: Aug 09 '20