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

unable to run the ros example #43

Open
kilimeters opened this issue Mar 18, 2016 · 3 comments
Open

unable to run the ros example #43

kilimeters opened this issue Mar 18, 2016 · 3 comments

Comments

@kilimeters
Copy link

Hi
When running the ros example,i got some problems.
I enter follow command
1.cd ORB_SLAM2&& cd Examples&& cd ROS&&cd ORB_SLAM2
2.export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/cm/ORB_SLAM2/Examples/ROS
3.rosrun ORB_SLAM2 RGBD /home//ORB_SLAM2/Vocabulary/ORBvoc.txt /home//ORB_SLAM2/Examples/RGB-D/TUM1.yaml

I get this error:
[ERROR] [1458306383.881071390]: [registerPublisher] Failed to contact master at [localhost:11311]. Retrying...
Hope to your reply, thank you.

@MathewDenny
Copy link

Make sure you are running ROS master before running any ROS node.
rosrun roscore

If the ROS master is running in another machine check/set your ROS_IP and ROS_MASTER_URI environment variables.

export ROS_IP=your_ip
export ROS_MASTER_URI=http://master_ip:11311
export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:pathtoORB_SLAM/Examples/ROS

@kilimeters
Copy link
Author

I just turn on a terminal and enter the last orders:
1.cd ORB_SLAM2&& cd Examples&& cd ROS&&cd ORB_SLAM2
2.export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/cm/ORB_SLAM2/Examples/ROS
3.rosrun ORB_SLAM2
What's the ROS master?
PS:could u leave the email adress?

在 2016-03-22 09:28:17,"Denny Mathew" notifications@github.com 写道:

Make sure you are running ROS master before running any ROS node.
rosrun roscore

If the ROS master is running in another machine check your check/set your ROS_IP and ROS_MASTER_URI environment variables.

export ROS_IP=;export ROS_MASTER_URI=http://:11311;export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}://Examples/ROS


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@MathewDenny
Copy link

The expected sequence would be
1.roscore &
2. Run the camera node / dataset
2.cd ORB_SLAM2 && cd Examples && cd ROS && cd ORB_SLAM2
3.export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:/home/cm/ORB_SLAM2/Examples/ROS 4.rosrun ORB_SLAM2 RGBD /home/ORB_SLAM2/Vocabulary/ORBvoc.txt /home/ORB_SLAM2/Examples/RGB-D/TUM1.yaml

The roscore command, which starts the rosmaster, should always be run first before executing any ROS node. Then only will you be able to communicate between your nodes and also a host of other tasks.

I would request you to get the basic intro to ROS first and then continue on.

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

2 participants