Giter VIP home page Giter VIP logo

blender-3d-position-visualization's Introduction

====== OpenRex 3D Board Position Visualisation in Blender ======

I created a video about how to do it. https://youtu.be/3Tjm3lMp4Co


====== APPENDIX ====== Down here you can find useful notes and codes.

===== Disable console output =====

We will be using serial port to communicate between OpenRex and Blender.

  • Boot up OpenRex to Linux and check IP address (run "ifconfig" command)root@ubuntu-imx6:~# ifconfig eth0 Link encap:Ethernet HWaddr 00:0d:01:50:0d:ce inet addr:10.0.0.44 Bcast:10.0.0.255 Mask:255.255.255.0 inet6 addr: 2601:206:4001:5f6f:20d:1ff:fe50:dce/64 Scope:Global inet6 addr: fe80::20d:1ff:fe50:dce/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:15 errors:0 dropped:0 overruns:0 frame:0 TX packets:17 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2621 (2.6 KB) TX bytes:2830 (2.8 KB)
  • Use "reboot" command to go into uBoot
  • Once you are in uBoot, remove console information from Kernel command line. Depends what you are using, SD card or SATA drive, try "printenv" and look for "mmcargs" or "sataargs". It may look like this: mmcargs=setenv bootargs console=${console},${baudrate} root=${mmcroot} ${video_args} ip=dhcp sataargs=setenv bootargs console=${console},${baudrate} root=${sataroot} ${video_args} ip=dhcp
  • If you are using SATA drive run this (if you are using mmc, change sataargs for mmcargs): setenv sataargs 'setenv bootargs root=${sataroot} ${video_args} ip=dhcp' saveenv reset
  • Leave the board boots up. Do not forget! You will not see the Linux messages in the console anymore. If you would like to see them again, you need to put the original "mmcargs" or "sataargs" value back.
  • Use Putty to connect to your board. Use the IP address from step 1 and port 22.

===== Test serial communication with Blender =====

==== Setup Serial Terminal ====

Note: If you do not have serial terminal on OpenRex, install it: apt-get install minicom setserial

Open Serial terminal on OpenRex:

  • On OpenRex, run "minicom -s"
  • Go to "Serial port setup" and press A. Change the Serial Device to "/dev/ttymxc0". Press F to change Hardware Flow Control to "No". Bps / Par / Bits should be set to "11520 8N1"
  • Press "Save setup as dfl" (so next time you do not need to set it up)
  • Press "Exit" go to console
  • If you need to leave terminal, press CTRL+A and then X, Yes.

==== Prepare Blender ====

If you have not installed pySerial yet, follow these steps

  • [[https://pypi.python.org/pypi/pyserial|Download pySerial]] (needed for Blender to be able to communicate with serial port)
  • Unpack pySerial and copy "serial" directory (located in pyserial-3.2.1.tar\pyserial-3.2.1) to c:\Program Files\Blender Foundation\Blender\2.78\python\lib\

==== Test serial communication between Blender and OpenRex ====

  • Open a new project in Blender
  • Click on "Choose screen layout" button (the button close to Help menu) and select Scripting
  • Click on "New File"
  • Copy and paste following: import serial import serial ser = serial.Serial() ser.baudrate = 115200 ser.port = 'COM8' ser.open()

ser.write(b'HelloWorld')

x = ser.read(size=5) print ("OpenRex says:", x)

ser.close()

  • Click on "Window" -> Toggle system console
  • Run the script
  • If everything is working oki, you should see HelloWorld in OpenRex minicom terminal
  • Go to OpenRex and write "works".
  • If everything works oki, in the system console you should see "OpenRex says: b'works'"

Perfect, we can communicate between Blender and OpenRex.

blender-3d-position-visualization's People

Contributors

robertferanec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

marciopocebon

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.