Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 1.6 KB

README.md

File metadata and controls

60 lines (43 loc) · 1.6 KB

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.