### Project Setup for Reachy 2 Blender Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt Instructions for setting up the Reachy 2 Blender project. This involves initializing Git LFS, cloning the repository, verifying the download of the main .blend file and assets, and opening the project in Blender. It ensures all necessary large binary files and assets are correctly downloaded and accessible. ```bash # Initialize Git LFS for handling .blend files git lfs install # Clone the repository git clone https://github.com/yourusername/reachy2-blender.git cd reachy2-blender # Verify .blend file downloaded completely ls -lh reachy2.blend # Expected size: ~1-10 MB (varies with model complexity) # Open in Blender blender reachy2.blend # Or launch Blender and File > Open > select reachy2.blend # Verify all assets present ls assets/ # Expected files: # - mariniere.jpg (texture) # - banner.png (documentation) # - *.gif (tutorial animations) ``` -------------------------------- ### Install Reachy2 SDK in Blender Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt This snippet details the installation process of the Reachy2 SDK within Blender's Python environment, enabling communication between Blender and the Reachy robot. It provides platform-specific instructions for Windows, macOS, and Linux, including commands for navigating the Blender directory structure and executing the installation using pip. ```bash # Navigate to Blender installation directory cd /path/to/blender-4.4.1-linux-x64/4.4/python/bin # Install reachy2-sdk using Blender's Python pip ./python3.11 -m pip install reachy2-sdk>=1.0.10 # Verify installation ./python3.11 -c "import reachy2_sdk; print(reachy2_sdk.__version__)" # Expected output: 1.0.10 or higher # Alternative for Windows: # cd C:\\Program Files\\Blender Foundation\\Blender 4.4\\4.4\\python\\bin # python.exe -m pip install reachy2-sdk>=1.0.10 # Alternative for macOS: # cd /Applications/Blender.app/Contents/Resources/4.4/python/bin # ./python3.11 -m pip install reachy2-sdk>=1.0.10 ``` -------------------------------- ### Install Reachy SDK for Blender Source: https://github.com/pollen-robotics/reachy2-blender/blob/main/README.md Installs the Reachy SDK within Blender's Python environment using pip. Ensure you navigate to Blender's Python binary folder before running the command. A minimum version of 1.0.10 is required for full functionality. ```bash cd /python/bin ./python3.11 -m pip install reachy2-sdk>=1.0.10 ``` -------------------------------- ### Docker Simulation Setup for Reachy Robot Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt This snippet provides instructions for setting up a simulated Reachy robot environment using Docker. It outlines the commands to pull the necessary Docker image, run the container with specific port mappings, and verify the container's status. The simulation allows for testing animations without requiring physical hardware. ```bash # Pull the Reachy2 Docker image docker pull pollenrobotics/reachy2:latest # Run the simulation container docker run -d \ --name reachy2-sim \ -p 50051:50051 \ -p 50052:50052 \ -p 50053:50053 \ pollenrobotics/reachy2:latest # Container exposes gRPC ports for SDK communication # Connect from Blender using "localhost" as robot IP # Check container status docker ps | grep reachy2-sim # View simulation logs docker logs -f reachy2-sim # Stop simulation docker stop reachy2-sim # Remove container docker rm reachy2-sim ``` -------------------------------- ### Clone Reachy2-Blender Project Source: https://github.com/pollen-robotics/reachy2-blender/blob/main/README.md Clones the Reachy2-Blender project repository, including Git LFS support for large files. After cloning, navigate into the project directory and open the main Blender file. ```bash git lfs install git clone reachy2-blender ``` -------------------------------- ### Run Blender Synchronization Script Source: https://github.com/pollen-robotics/reachy2-blender/blob/main/README.md Executes the `GUI.py` script within Blender's Scripting workspace to launch the synchronization interface. This interface allows connecting to a Reachy robot and synchronizing Blender animations with real-time robot movements. ```python # Navigate to the Scripting workspace in Blender. # Open the GUI.py script in the text editor. # Click 'Run Script'. ``` -------------------------------- ### Real-Time Robot Synchronization in Blender Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt This snippet outlines how to synchronize Blender animations with a physical or simulated Reachy robot using the GUI.py script embedded in Blender. It provides a workflow for connecting to the robot, selecting body parts for synchronization, and observing real-time mirroring of movements in Blender and on the robot. ```python # In Blender, navigate to the Scripting workspace # The GUI.py script should be open in the text editor # Click "Run Script" to launch the Reachy Control window # The GUI provides three states: # 1. Disconnected - Enter robot IP address to connect # 2. Connected - Select body parts to synchronize (head, right arm, left arm) # 3. Synchronizing - Real-time position streaming active # Example connection workflow: # 1. Enter robot IP: "localhost" or "192.168.1.100" # 2. Click "Connect" # 3. Select parts: Check "Right Arm", "Left Arm", "Head" # 4. Click "Start Synchronization" # 5. Move joints in Blender viewport # 6. Robot mirrors movements in real-time # The synchronization reads joint angles from Blender controllers # and sends them to the robot via the Reachy SDK at fixed intervals ``` -------------------------------- ### Access Reachy 2 Shirt Material Node Tree in Blender Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt This Python script accesses the material node tree for the Reachy 2 'ShirtMaterial' in Blender. It finds an image node containing 'mariniere' in its name and loads the 'mariniere.jpg' texture into it. The script then switches the viewport shading to Material Preview mode to visualize the texture. It requires the Blender Python API (bpy). ```python import bpy # Access the material node tree for the shirt shirt_material = bpy.data.materials.get('ShirtMaterial') if shirt_material and shirt_material.use_nodes: nodes = shirt_material.node_tree.nodes # Find the mariniere.jpg image node image_node = None for node in nodes: if node.type == 'TEX_IMAGE' and 'mariniere' in node.name: image_node = node break if image_node: # Load the mariniere.jpg texture image_path = "/path/to/reachy2-blender/assets/mariniere.jpg" image_node.image = bpy.data.images.load(image_path) print("Texture loaded successfully") # Switch viewport shading to Material Preview or Rendered mode # to see the sailor shirt texture bpy.context.space_data.shading.type = 'MATERIAL' ``` -------------------------------- ### Program Joint Control for Reachy 2 in Blender Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt This Python script demonstrates how to programmatically control specific Reachy 2 joints in Blender using the bpy API. It accesses joint controllers by name, sets their rotation (Roll, Pitch, Yaw) in radians, and inserts keyframes for animation. The script requires the Blender Python API (bpy) and the 'math' module. ```python import bpy import math # Access joint controllers by name neck = bpy.data.objects.get('NeckController') right_elbow = bpy.data.objects.get('RightElbowController') left_wrist = bpy.data.objects.get('LeftWristController') # Set neck rotation (Orbita3D - 3 DOF) if neck: neck.rotation_euler[0] = math.radians(15) # Roll neck.rotation_euler[1] = math.radians(-10) # Pitch neck.rotation_euler[2] = math.radians(20) # Yaw neck.keyframe_insert(data_path="rotation_euler") # Set elbow rotation (Orbita2D - 2 DOF) if right_elbow: right_elbow.rotation_euler[0] = math.radians(45) right_elbow.rotation_euler[1] = math.radians(30) right_elbow.keyframe_insert(data_path="rotation_euler") # Set wrist rotation (Orbita3D - 3 DOF) if left_wrist: left_wrist.rotation_euler = ( math.radians(10), math.radians(20), math.radians(-15) ) left_wrist.keyframe_insert(data_path="rotation_euler") # Update scene bpy.context.view_layer.update() ``` -------------------------------- ### Configure Texture in Blender Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt Instructions on adding the mariniere.jpg and applying it to the Reachy model for correct material rendering within the Blender environment. This snippet references specific Blender workspace like the Shading workspace. ```python # In Blender, switch to Shading workspace # Steps to add mariniere.jpg texture: import bpy # Switch to object mode bpy.ops.object.mode_set(mode='OBJECT') ``` -------------------------------- ### Animate Reachy Robot Joints in Blender Source: https://context7.com/pollen-robotics/reachy2-blender/llms.txt This snippet demonstrates how to animate individual joints of the Reachy robot model in Blender using its animation interface. It covers controlling Orbita2D and Orbita3D joints with specific controllers for each actuator type. This uses Python scripting within Blender to animate specific joints, creating keyframes to define their rotation over time. This code requires Blender 4.3.2 or higher. ```python import bpy # Access the right shoulder controller right_shoulder = bpy.data.objects['RightShoulderController'] # Set initial position at frame 1 bpy.context.scene.frame_set(1) right_shoulder.rotation_euler = (0, 0, 0) right_shoulder.keyframe_insert(data_path="rotation_euler", frame=1) # Set target position at frame 60 bpy.context.scene.frame_set(60) right_shoulder.rotation_euler = (0, 0, 1.57) # 90 degrees in radians right_shoulder.keyframe_insert(data_path="rotation_euler", frame=60) # Play animation: bpy.ops.screen.animation_play() ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.