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

Revision history [back]

click to hide/show revision 1
initial version

Ok so I manage to make this work, it's not pretty and I'm sure there is a correct solution but:

  1. create ros2 workspace in /path/to/blender/scripts/
  2. create a package inside the workspace and write the node inside
  3. copy the desired ros2 packages (rclpy, std_msgs etc..) to /path/to/blender/scripts/modules (i copied the whole ros2 package folder)
  4. build the workspace

--- if your ros2 python env doesnt match the python version of blender ---

  • in each package edit the name of the .so file, for example, I work with python 3.8.10 and blender was with python 3.9.2 (2.93.5 version of blender) so the file: std_msgs_s__rosidl_typesupport_c.cpython-38-x86_64-linux-gnu.so inside std_msgs package was changed to std_msgs_s__rosidl_typesupport_c.cpython-39-x86_64-linux-gnu.so. probably you will have to debug it for few tries until you change everything in all the packages.

now you should be able to run ros2 nodes from blender, you can use the GUI or from terminal.

Ok so I manage to make this work, it's not pretty and I'm sure there is a correct solution but:

  1. create ros2 workspace in /path/to/blender/scripts/
  2. create a package inside the workspace and write the node inside
  3. copy the desired ros2 packages (rclpy, std_msgs etc..) to /path/to/blender/scripts/modules (i copied the whole ros2 package folder)
  4. build the workspace

--- if your ros2 python env doesnt match the python version of blender ---

  • in each package edit the name of the .so file, for example, I work with python 3.8.10 and blender was with python 3.9.2 (2.93.5 version of blender) so the file: std_msgs_s__rosidl_typesupport_c.cpython-38-x86_64-linux-gnu.so inside std_msgs package was changed to std_msgs_s__rosidl_typesupport_c.cpython-39-x86_64-linux-gnu.so. probably you will have to debug it for few tries until you change everything in all the packages.

now you should be able to run ros2 nodes from blender, you can use the GUI or from terminal.

don't forget to source the ros2 bash files.

Ok so I manage to make this work, it's not pretty and I'm sure there is a correct solution but:

  1. create ros2 workspace in /path/to/blender/scripts/
  2. create a package inside the workspace and write the node inside
  3. copy the desired ros2 packages (rclpy, std_msgs etc..) to /path/to/blender/scripts/modules (i copied the whole ros2 package folder)
  4. build the workspace

--- if your ros2 python env doesnt match the python version of blender ---

  • in each package edit the name of the .so file, for example, I work with python 3.8.10 and blender was with python 3.9.2 (2.93.5 version of blender) so the file: std_msgs_s__rosidl_typesupport_c.cpython-38-x86_64-linux-gnu.so inside std_msgs package was changed to std_msgs_s__rosidl_typesupport_c.cpython-39-x86_64-linux-gnu.so. probably you will have to debug it for few tries until you change everything in all the packages.

now you should be able to run ros2 nodes from blender, you can use the GUI or from terminal.terminal to run the nodes.

don't forget to source the ros2 bash files.

Ok so I manage to make this work, it's not pretty and I'm sure there that this is a correct solution but:

  1. create ros2 workspace in /path/to/blender/scripts/
  2. create a package inside the workspace and write the node inside
  3. copy the desired ros2 packages (rclpy, std_msgs etc..) to /path/to/blender/scripts/modules (i copied the whole ros2 package folder)
  4. build the workspace

--- if your ros2 python env doesnt match the python version of blender ---

  • in each package edit the name of the .so file, for example, I work with python 3.8.10 and blender was with python 3.9.2 (2.93.5 version of blender) so the file: std_msgs_s__rosidl_typesupport_c.cpython-38-x86_64-linux-gnu.so inside std_msgs package was changed to std_msgs_s__rosidl_typesupport_c.cpython-39-x86_64-linux-gnu.so. probably you will have to debug it for few tries until you change everything in all the packages.

now you should be able to run ros2 nodes from blender, you can use the GUI or terminal to run the nodes.

don't forget to source the ros2 bash files.

Ok so I manage to make this work, it's not pretty and I'm sure that this is a correct solution but:

  1. create ros2 workspace in /path/to/blender/scripts/
  2. create a package inside the workspace and write the node inside
  3. copy the desired ros2 packages (rclpy, std_msgs etc..) to /path/to/blender/scripts/modules (i copied the whole ros2 package folder)

  4. build the workspace

--- if your ros2 python env doesnt match the python version of blender ---

  • in each package edit the name of the .so file, for example, I work with python 3.8.10 and blender was with python 3.9.2 (2.93.5 version of blender) so the file: std_msgs_s__rosidl_typesupport_c.cpython-38-x86_64-linux-gnu.so inside std_msgs package was changed to std_msgs_s__rosidl_typesupport_c.cpython-39-x86_64-linux-gnu.so. probably you will have to debug it for few tries until you change everything in all the packages.packages

now you should be able to run ros2 nodes from blender, you can use the GUI or terminal to run the nodes.

don't forget to source the ros2 bash files.