Skip to content

solosito/cozmo_ros2_ws

Repository files navigation

cozmo_ros2_ws

Dependencies

ROS2

This repository was tested using ROS 2 Eloquent Elusor (follow official documentation for installation)

PyCozmo

Link to official site

Currently using a forked version.

For installing it follow the steps from Clone and build

opencv-python

python3 -m pip install opencv-python

Clone and build

  1. Create a new ROS2 workspace or use an existing one
    mkdir -p ~/cozmo_ros2_ws/src

  2. Clone this repo
    git clone --recursive https://github.com/solosito/cozmo_ros2_ws.git ~/cozmo_ros2_ws/src/.

  3. Install PyCozmo local version

cd ~/cozmo_ros2_ws/src/pycozmo
python3 -m pip install -e .
  1. Build the code
    Go to the workspace folder
    cd ~/cozmo_ros2_ws
    then
    colcon build

  2. Source the workspace
    . ~/cozmo_ros2_ws/install/setup.bash

Run

  1. Connect to the Cozmo Wi-Fi network

  2. Run the cozmo bringup node
    ros2 run cozmo_ros2_nosdk bringup

  3. Run the cozmo keyboard teleop controller node in a new terminal (need to source workspace)
    ros2 run cozmo_ros2_nosdk teleop_twist_keyboard

  4. Run the image viewer
    ros2 run image_tools showimage --ros-args --remap image:=/cozmo/camera

Troubleshooting

Error:
Cannot connect to cozmo:

pycozmo.exception.ConnectionTimeout: Failed to connect to Cozmo.

Solution:
Stop the rest of the nodes before starting the cozmo bringup node.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published