Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

online mapping #14

Open
sunt40 opened this issue Apr 8, 2019 · 12 comments
Open

online mapping #14

sunt40 opened this issue Apr 8, 2019 · 12 comments

Comments

@sunt40
Copy link

sunt40 commented Apr 8, 2019

Here is my steps to run ratslam for online mapping:
1.I modified the config file:
Change the first line "topic_root=stlucia" to "topic_root=/usb_cam/image_raw/compressed"
2.I modified the launch file :
Replace all references to "$(find ratslam_ros)/config/config_stlucia.txt" with "$(find ratslam_ros)/config/config_my_robot.txt.in"
Replace with
3.Then I typed in the terminal as follows:
roslaunch usb_cam usb_cam-test.launch
roslaunch ratslam_ros my_robot.launch
After that,four blank windows popped up,but they are not wok.
What mistakes did I make?

@scott--
Copy link
Collaborator

scott-- commented Apr 9, 2019

It's hard to diagnose issues without being able to test the running system.

There are a couple of issues with your steps though:

Change the first line "topic_root=stlucia" to "topic_root=/usb_cam/image_raw/compressed"

OpenRatSLAM adds the topic root to "/camera/image", so in your case your topic root should just be "usb_cam" (see lines below)

  image_transport::ImageTransport it(node);
  image_transport::Subscriber sub = it.subscribe(topic_root + "/camera/image", 0, boost::bind(image_callback, _1, &pub_vt));

You might need to remap your topic to what RatSLAM expects:
rosrun topic_tools relay /usb_cam/image_raw/compressed /usb_cam/camera/image/compressed
(You'll need topic_tools installed for this to work)

Replace all references to "$(find ratslam_ros)/config/config_stlucia.txt" with "$(find ratslam_ros)/config/config_my_robot.txt.in"

The build process for OpenRatSLAM takes all the files (*.txt.in) in the src/ratslam_ros/config directory, fills in templates, and then produces an output config (*.txt) in devel/share/ratslam_ros/config. As long as you put your config file in the same folder, you can just change
$(find ratslam_ros)/config/config_stlucia.txt to
$(find ratslam_ros)/config/config_my_robot.txt

Then I typed in the terminal as follows:

This looks OK. After doing this step trying running
rosnode info /RatSLAMLocalViewCells
to see if the topics are connected as you expect.

@sunt40
Copy link
Author

sunt40 commented Apr 9, 2019

@scott--
I follow your advice and the errors are as follows:
ratslam_pc: /home/sunt/catkin_ratslam/src/ratslam_ros/src/ratslam/posecell_network.cpp:1034: void ratslam::PosecellNetwork::on_view_template(unsigned int, double): Assertion vt == visual_templates.size() - 1' failed. REQUIRED process [RatSLAMPoseCells-2] has died!
process has died [pid 7350, exit code -6, cmd /home/sunt/catkin_ratslam/devel/lib/ratslam_ros/ratslam_pc /home/sunt/catkin_ws/devel/share/ratslam_ros/config/config_my_robot.txt _image_transport:=compressed __name:=RatSLAMPoseCells __log:=/home/sunt/.ros/log/477d42b4-5a6d-11e9-a44d-54bf644811c1/RatSLAMPoseCells-2.log].
log file: /home/sunt/.ros/log/477d42b4-5a6d-11e9-a44d-54bf644811c1/RatSLAMPoseCells-2*.log
Initiating shutdown!`
What should I do?

@scott--
Copy link
Collaborator

scott-- commented Apr 10, 2019

That assertion is indicating that there is a sequencing error in messages sent. Do you get the same error when you run OpenRatSLAM from a bag file?

Try running the OpenRatSLAM launch files before publishing from the robot - it could be caused by a race condition where OpenRatSLAM connects to your robot before its own nodes connect to each other.

@sunt40
Copy link
Author

sunt40 commented Apr 10, 2019

When I run OpenRatSLAM from a bag file, it works well.
I just run OpenRatSLAM in my laptop.I just provide images for OpenRatSLAM,but the posecell_network needs odometry infomation.
Do I have to provide odometer information?

@scott--
Copy link
Collaborator

scott-- commented Apr 10, 2019

You can either provide odometry directly from your robot, if you have encoders, or use the RatSLAMVisualOdometry node to provide odometry from the images (see the stlucia.launch file).

@sunt40
Copy link
Author

sunt40 commented Apr 10, 2019

I followed your advice and opened the launch file first . The errors are as follows:

ratslam_pc: /home/sunt/catkin_ratslam/src/ratslam_ros/src/ratslam/posecell_network.cpp:1034: void ratslam::PosecellNetwork::on_view_template(unsigned int, double): Assertion `vt == visual_templates.size() - 1' failed.
================================================================================REQUIRED process [RatSLAMPoseCells-3] has died!
process has died [pid 4561, exit code -6, cmd /home/sunt/catkin_ratslam/devel/lib/ratslam_ros/ratslam_pc /home/sunt/catkin_ws/devel/share/ratslam_ros/config/config_my_robot.txt _image_transport:=compressed __name:=RatSLAMPoseCells __log:=/home/sunt/.ros/log/264d37da-5b2a-11e9-bc88-54bf644811c1/RatSLAMPoseCells-3.log].
log file: /home/sunt/.ros/log/264d37da-5b2a-11e9-bc88-54bf644811c1/RatSLAMPoseCells-3*.log
Initiating shutdown!

@sunt40
Copy link
Author

sunt40 commented Apr 10, 2019

I made it !!! Thank you very much!!!

@gaohao304
Copy link

I followed your advice and opened the launch file first . The errors are as follows:

ratslam_pc: /home/sunt/catkin_ratslam/src/ratslam_ros/src/ratslam/posecell_network.cpp:1034: void ratslam::PosecellNetwork::on_view_template(unsigned int, double): Assertion `vt == visual_templates.size() - 1' failed.
================================================================================REQUIRED process [RatSLAMPoseCells-3] has died!
process has died [pid 4561, exit code -6, cmd /home/sunt/catkin_ratslam/devel/lib/ratslam_ros/ratslam_pc /home/sunt/catkin_ws/devel/share/ratslam_ros/config/config_my_robot.txt _image_transport:=compressed __name:=RatSLAMPoseCells __log:=/home/sunt/.ros/log/264d37da-5b2a-11e9-bc88-54bf644811c1/RatSLAMPoseCells-3.log].
log file: /home/sunt/.ros/log/264d37da-5b2a-11e9-bc88-54bf644811c1/RatSLAMPoseCells-3*.log
Initiating shutdown!

hello,I met the same problem, I will appreciate it that you give some advice to solve this error

@sunt40
Copy link
Author

sunt40 commented Sep 26, 2019

打开你的my_robot.launch,看一下是否启动了里程计节点

@gaohao304
Copy link

打开你的my_robot.launch,看一下是否启动了里程计节点
ros小白一枚,在哪里打开my_robot.launch,求指点。感谢
可以加您QQ或者微信么,我的QQ974517314

@gaohao304
Copy link

打开你的my_robot.launch,看一下是否启动了里程计节点
hello,我输入rosnode list ,检查了启动的节点,如下:
/RatSLAMExperienceMap
/RatSLAMPoseCells
/play_1569552795086280425
/rosout
确实没有发现里程计节点,我跑的是openratslam里面irataus.launch,应该有一个名为:RatSLAMLocalView的节点来着,但是rosnode list之后发现并没有该节点。如下所示是我的运行结果:实在麻烦您给点建议,谢谢(如何启动RatSLAMLocalView,这个节点应该是在运行过程中被终止了)
roslaunch ratslam_ros irataus.launch
... logging to /home/gaohao/.ros/log/e7dbcfce-e0d1-11e9-b98f-74d43582a313/roslaunch-gaohao-pc-10669.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://gaohao-pc:45987/

SUMMARY

PARAMETERS

  • /rosdistro: kinetic
  • /rosversion: 1.12.14

NODES
/
RatSLAMExperienceMap (ratslam_ros/ratslam_em)
RatSLAMLocalViewCells (ratslam_ros/ratslam_lv)
RatSLAMPoseCells (ratslam_ros/ratslam_pc)
overhead (image_view/image_view)
plot_vt_em (rqt_plot/rqt_plot)
record (rosbag/record)

ROS_MASTER_URI=http://localhost:11311

process[RatSLAMLocalViewCells-1]: started with pid [10686]
process[RatSLAMPoseCells-2]: started with pid [10687]
process[RatSLAMExperienceMap-3]: started with pid [10688]
process[plot_vt_em-4]: started with pid [10689]
process[record-5]: started with pid [10705]
process[overhead-6]: started with pid [10723]
================================================================================REQUIRED process [RatSLAMPoseCells-2] has died!
process has died [pid 10687, exit code -11, cmd /home/gaohao/catkin_ws/devel/lib/ratslam_ros/ratslam_pc /home/gaohao/catkin_ws/devel/share/ratslam_ros/config/config_irataus.txt _image_transport:=compressed __name:=RatSLAMPoseCells __log:=/home/gaohao/.ros/log/e7dbcfce-e0d1-11e9-b98f-74d43582a313/RatSLAMPoseCells-2.log].
log file: /home/gaohao/.ros/log/e7dbcfce-e0d1-11e9-b98f-74d43582a313/RatSLAMPoseCells-2*.log
Initiating shutdown!

[overhead-6] killing on exit
[record-5] killing on exit
[plot_vt_em-4] killing on exit
[RatSLAMExperienceMap-3] killing on exit
[RatSLAMPoseCells-2] killing on exit
[RatSLAMLocalViewCells-1] killing on exit
Traceback (most recent call last):
File "/opt/ros/kinetic/lib/rqt_plot/rqt_plot", line 6, in
from rqt_plot.plot import Plot
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/plot.py", line 43, in
from .data_plot import DataPlot
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rqt_plot/data_plot/init.py", line 34, in
import numpy
File "/usr/lib/python2.7/dist-packages/numpy/init.py", line 203, in
from . import ma
File "/usr/lib/python2.7/dist-packages/numpy/ma/init.py", line 44, in
from . import core
File "/usr/lib/python2.7/dist-packages/numpy/ma/core.py", line 21, in
"""
KeyboardInterrupt
shutting down processing monitor...
... shutting down processing monitor complete
done

@sunt40
Copy link
Author

sunt40 commented Oct 7, 2019

我在工作空间编译成功后,直接运行 roslaunch ratslam_ros irataus.launch 然后在运行
rosbag play irat_aus_28112011.bag 可以运行成功

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants