apollo icon indicating copy to clipboard operation
apollo copied to clipboard

command " rosbag " not fonud

Open luckdsfy opened this issue 9 years ago • 18 comments

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?

luckdsfy avatar Jul 13 '17 06:07 luckdsfy

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

siyangy avatar Jul 13 '17 06:07 siyangy

how to check the ros is running succ?

luckdsfy avatar Jul 13 '17 07:07 luckdsfy

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

startcode avatar Jul 17 '17 21:07 startcode

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.

wanglei828 avatar Jul 18 '17 21:07 wanglei828

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

qwetqwe avatar Jul 27 '17 01:07 qwetqwe

@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 avatar Jul 27 '17 03:07 ycool

@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 avatar Jul 29 '17 01:07 qwetqwe

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

ycool avatar Jul 29 '17 02:07 ycool

@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

qwetqwe avatar Jul 30 '17 03:07 qwetqwe

type exit and press enter inside docker terminal

ycool avatar Jul 30 '17 05:07 ycool

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

qwetqwe avatar Jul 30 '17 05:07 qwetqwe

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

ycool avatar Jul 30 '17 05:07 ycool

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

qwetqwe avatar Jul 30 '17 05:07 qwetqwe

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 avatar Jul 30 '17 05:07 ycool

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

qwetqwe avatar Jul 30 '17 05:07 qwetqwe

@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 manually source /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 avatar Jan 16 '18 11:01 WelfredJiang

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

quning18 avatar Apr 12 '18 08:04 quning18

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.

Zhenni17 avatar Jun 05 '18 23:06 Zhenni17