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

Why can't I import rosbag in Colab?

asked 2019-07-22 12:17:02 -0500

lewleib gravatar image

1

I am attempting to use Google Colab to run https://github.com/ARiSE-Lab/deepTest deep neural network software developed on Ubuntu. I was able to run the install.sh with small modifications. I was successful, after adding "!", in loading:

! sudo apt-get install python-rosbag 
! sudo apt-get install python-genmsg 
! sudo apt-get install python-genpy 
! sudo apt-get install python-rosgraph-msgs1re

This installed many files including:

Setting up python-rosbag (1.13.5+ds1-3) ...

However, when I ran the program generate_hmb3.py whose 2nd line is:

import rosbag

I got an invalid syntax error message. When I changed the line to read:

import python-rosbag

I got the message:

File "<ipython-input-12-37a7e266f3af>", line 7
import python-rosbag
         ^
SyntaxError: invalid syntax

Any solutions to this problem?

edit retag flag offensive close merge delete

Comments

Can you help: RogerErens

lewleib gravatar image lewleib  ( 2019-07-23 13:27:10 -0500 )edit

When I did a find I got: !find / . -name "python-rosbag" -print

  /usr/share/doc/python-rosbag

Any ideas @OperationCrossbow@gvdhoorn

lewleib gravatar image lewleib  ( 2019-07-24 13:07:46 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-04-14 15:42:24 -0500

Here is an example how to do it https://colab.research.google.com/git...

edit flag offensive delete link more

Question Tools

Stats

Asked: 2019-07-22 12:17:02 -0500

Seen: 868 times

Last updated: Jul 22 '19