Apollo: command " rosbag " not fonud

Created on 13 Jul 2017  ·  18Comments  ·  Source: ApolloAuto/apollo

when i have set all config in vmware ubuntu14.04 step by step
then run:
rosbag play docs/demo_guide/demo.bag --loop

but fail, the message is:
bash: rosbag: command not found

how to install rosbag command?

CarOS Question

Most helpful comment

It indicates your env has downloaded ros dependency. manually source /apollo/bazel-apollo/external/ros/setup.bash and rosbag should work for you. Generally, dev_into.sh will source ros setup.bash for you.

All 18 comments

You can run this command in docker, see https://github.com/ApolloAuto/apollo/blob/master/README.md.

how to check the ros is running succ?

ROS is a library. If you can run the rosbag play command, your ros library should be OK.

Current ros package downloading is integrated into the bazel workspace. If you have never build the apollo repo. Ros package will not exist in you environment.

Hi! I have met the same problem,did you solve it ?

@qwetqwe are you using release docker env or dev docker env?

If using dev docker env, you need run apollo.sh build once to pull ros dependency. logout from docker and docker/scripts/dev_into.sh again. It will setup the ROS env for you.

@ycool I used dev docker env. and I ran apollo.sh build again .but it did not work. Should I setup the apollo-platform first?

@qwetqwe do you logout from docker after apollo.sh build? No need to setup apollo-platform. apollo.sh automatically pulls the dependency.

@ycool I don't know how to logout?
I entered " docker logout" and it displayed
bash: docker: command not found
If I entered in another terminal it displayed
Not logged in to https://index.docker.io/v1/
thank you very much for your reply

type exit and press enter inside docker terminal

@ycool I did as you said ,but it still suggested rogbag command not found

Does apollo.sh build work for you? If so, you can check if the ros dependency exists by ls -l /apollo/bazel-apollo/external/ros/setup.bash

build passed. And it showed
lrwxrwxrwx 1 root root 87 Jul 29 15:03 /apollo/bazel-apollo/external/ros/setup.bash -> /root/.cache/bazel/_bazel_root/540135163923dd7d5820f3ee4b306b32/external/ros/setup.bash

It indicates your env has downloaded ros dependency. manually source /apollo/bazel-apollo/external/ros/setup.bash and rosbag should work for you. Generally, dev_into.sh will source ros setup.bash for you.

@ycool After I source it,it worked.
Thank you very much (๑•̀ㅂ•́)و✧

@ycool , i am facing the same question:

root@in_dev_docker:/apollo# rosbag play -l ./docs/demo_guide/demo_2.0.bag
bash: rosbag: command not found

and when i run apollo.sh build, it shows:
Building: no action running
and the code takes ten minutes or so.
while manuallysource /apollo/bazel-apollo/external/ros/setup.bash, it shows:

root@in_dev_docker:/apollo# ls -l /apollo/bazel-apollo/external/ros/setup.bash
ls: cannot access /apollo/bazel-apollo/external/ros/setup.bash: No such file or directory

jwf@jwf-HP:~/apollo$ ls -l /apollo/bazel-apollo/external/ros/setup.bash
ls: 无法访问'/apollo/bazel-apollo/external/ros/setup.bash': 权限不够
jwf@jwf-HP:~/apollo$ sudo ls -l /apollo/bazel-apollo/external/ros/setup.bash
ls: 无法访问'/apollo/bazel-apollo/external/ros/setup.bash': 没有那个文件或目录

did i miss some set-up steps or someting?

@WelfredJiang have you ran into any error when running the dev_into.sh?

It seems like the OP was resolved besides the last question (https://github.com/ApolloAuto/apollo/issues/181#issuecomment-357938655). An answer was proposed to the question. It's been 2 months, so I am closing the issue for now. Feel free to open a new issue if you still have questions about this topic.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chasingw picture chasingw  ·  3Comments

poutyface picture poutyface  ·  3Comments

BenBaek picture BenBaek  ·  3Comments

ahuer2435 picture ahuer2435  ·  3Comments

JSnobody picture JSnobody  ·  3Comments