TensorFlow / Keras Model Predict Error

Unexpected error: Tensor Tensor(“dense_1/BiasAdd:0”, shape=(?, 3), dtype=float32) is not an element of this graph.

To Fix:

Make sure to include the following global:

import tensorflow as tf global graph,model graph = tf.get_default_graph()

And surround the prediction as such:

with graph.as_default(): segment = self.model.predict(features)

ROS – rviz X Window System error.

rosrun rviz rviz [ INFO] [1322561467.803234807]: rviz revision number 1.6.7 [ INFO] [1322561467.803351442]: ogre_tools revision number 1.6.2 [ INFO] [1322561467.803374070]: compiled against OGRE version 1.7.3 (Cthugha) [ INFO] [1322561467.946771146]: Loading general config from [/home/alex/.rviz/config] [ INFO] [1322561467.946953292]: Loading display config from [/home/alex/.rviz/display_config] [ INFO] [1322561467.972674791]: RTT Preferred Mode is PBuffer. The program ‘rviz’ received […]

ROS: Publishing and Subscribing to Arrays

In ROS (Robot Operating System) it’s really easy to publish variables to be used between nodes running on the same roscore however I was having some difficulty doing the same for arrays. The problem came when there was no real examples of how to use them, so here is a working example of std_msgs/*MultiArray […]

Kinect Development – Day 1

Head over to this page if you want some tutorials on getting started with the Kinect and libfreenect, I’ll update more as time goes on and I have free time.

I’ve been meaning to grab myself an Xbox 360 Kinect for a while, not because I’m a big motion controlled game fan but for […]

Inverted Pendulum

As part of my Robotics university course we used an Inverted Pendulum rig to learn some control applications/algorithms. For extra marks we had the challenge to swing the pendulum from hanging down to an upright balancing position. Below is my first attempt which still needs a little tweaking to the values to reduce swings […]