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

running jetbot_ros in Jupyterlab #46

Open
smalloytn opened this issue Nov 6, 2021 · 1 comment
Open

running jetbot_ros in Jupyterlab #46

smalloytn opened this issue Nov 6, 2021 · 1 comment

Comments

@smalloytn
Copy link

smalloytn commented Nov 6, 2021

Following:
jetbot_ros

ROS2 nodes and Gazebo model for NVIDIA JetBot with Jetson Nano

note: if you want to use ROS Melodic, see the melodic branch

Start the JetBot ROS2 Foxy container

git clone https://github.com/dusty-nv/jetbot_ros
cd jetbot_ros
docker/run.sh

I installed jetbot_ros and testing while attached to hdmi monitor everything worked, now using battery pack and accessing jetbot remotely through Jupyterlab.
I ran in Jupyter lab terminal:
cd jetbot_ros
docker/run.sh

get this error:
root@nano-4gb-jp45:/workspace/jetbot_ros# docker/run.sh
head: cannot open '/etc/nv_tegra_release' for reading: No such file or directory
reading L4T version from "dpkg-query --show nvidia-l4t-core"
dpkg-query: no packages found matching nvidia-l4t-core
L4T BSP Version: L4T R.
CONTAINER: dustynv/jetbot_ros:foxy-r.
DEV_VOLUME:
DATA_VOLUME: --volume /workspace/jetbot_ros/data:/workspace/src/jetbot_ros/data
USER_VOLUME:
USER_COMMAND:
V4L2_DEVICES: --device /dev/video0
docker/run.sh: line 182: sudo: command not found
docker/run.sh: line 186: sudo: command not found
xauth: file /root/.Xauthority does not exist
xauth: file /tmp/.docker.xauth does not exist
xauth: (argv):1: unable to read any entries from file "(stdin)"
chmod: cannot access '/tmp/.docker.xauth': No such file or directory
docker/run.sh: line 191: sudo: command not found
root@nano-4gb-jp45:/workspace/jetbot_ros#

sudo command not found

run.sh lines 181-199

give docker root user X11 permissions

sudo xhost +si:localuser:root

enable SSH X11 forwarding inside container (https://stackoverflow.com/q/48235040)

XAUTH=/tmp/.docker.xauth
sudo rm -rf $XAUTH
xauth nlist $DISPLAY | sed -e 's/^..../ffff/' | xauth -f $XAUTH nmerge -
chmod 777 $XAUTH

run the container

sudo docker run --runtime nvidia -it --rm --name jetbot_ros
--network host
--privileged
-e DISPLAY=$DISPLAY
-v /tmp/.X11-unix/:/tmp/.X11-unix
-v $XAUTH:$XAUTH -e XAUTHORITY=$XAUTH
-v /tmp/argus_socket:/tmp/argus_socket
-v /etc/enctune.conf:/etc/enctune.conf
$MOUNTS $CONTAINER_IMAGE $USER_COMMAND

@dusty-nv
Copy link
Owner

dusty-nv commented Nov 8, 2021

Unlike the original jetbot repo which uses IPython notebooks, jetbot_ros isn't really designed/intended to be run from JupyterLab. Does it work fine over SSH?

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