Practical

How to sound like a native English speaker?

To sound like a native English speaker, I start echoing. However, I need video/audios that suits me, along with the script.

Echo method: http://homepage.ntu.edu.tw/~karchung/pubs/CET6970.pdf

Best resource for me: https://tw.voicetube.com/search?query=crash+course&time=medium

Advertisements
Robotics, ROS

How to solve ResourceNotFound: gazebo_worlds error when running simulated PR2 for gps?

When I tried to launch the simulated PR2 by

roslaunch gps_agent_pkg pr2_gazebo.launch

This error occurred:

 

gazebo_worlds_error

ros@ros-K401UB:~/research/gps/src/gps_agent_pkg$ roslaunch gps_agent_pkg pr2_gazebo.launch
... logging to /home/ros/.ros/log/10b10e84-bbe8-11e7-944c-82ea96c4b45e/roslaunch-ros-K401UB-7307.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

Traceback (most recent call last):
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/__init__.py", line 307, in main
 p.start()
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 268, in start
 self._start_infrastructure()
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 217, in _start_infrastructure
 self._load_config()
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/parent.py", line 132, in _load_config
 roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/config.py", line 451, in load_config_default
 loader.load(f, config, verbose=verbose)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 746, in load
 self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 718, in _load_launch
 self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 682, in _recurse_load
 val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
 return f(*args, **kwds)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 625, in _include_tag
 default_machine, is_core, verbose)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 682, in _recurse_load
 val = self._include_tag(tag, context, ros_config, default_machine, is_core, verbose)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
 return f(*args, **kwds)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 587, in _include_tag
 inc_filename = self.resolve_args(tag.attributes['file'].value, context)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 183, in resolve_args
 return substitution_args.resolve_args(args, context=context.resolve_dict, resolve_anon=self.resolve_anon)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 316, in resolve_args
 resolved = _resolve_args(resolved, context, resolve_anon, commands)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 329, in _resolve_args
 resolved = commands[command](resolved, a, args, context)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 142, in _find
 source_path_to_packages=source_path_to_packages)
 File "/opt/ros/indigo/lib/python2.7/dist-packages/roslaunch/substitution_args.py", line 188, in _find_executable
 full_path = _get_executable_path(rp.get_path(args[0]), path)
 File "/usr/lib/python2.7/dist-packages/rospkg/rospack.py", line 203, in get_path
 raise ResourceNotFound(name, ros_paths=self._ros_paths)
ResourceNotFound: gazebo_worlds
ROS path [0]=/opt/ros/indigo/share/ros
ROS path [1]=/home/ros/rosbuild_ws/package_dir
ROS path [2]=/opt/ros/indigo/share
ROS path [3]=/opt/ros/indigo/stacks
ROS path [4]=/home/ros/research/gps
ROS path [5]=/home/ros/research/gps/src/gps_agent_pkg

This happened because gazebo_worlds only exists in the version before ROS Groovy. So,  you can modify the launch file by rosed gps_agent_pkg pr2_gazebo_no_controller.launch :

<launch>
 <!-- Use the following for ROS hydro or later: <include file="$(find gazebo_ros)/launch/empty_world.launch"> -->
 <include file="$(find gazebo_ros)/launch/empty_world.launch">
 </include>
 <include file="$(find pr2_gazebo)/launch/pr2_no_controllers.launch" />
</launch>

After modification, the error changes. Obviously, this is another problem (import glob error).

import_glob_error

 

Robotics, ROS

How to solve caffe.hpp: No such file or directory error when compiling gps_agent_pkg?

When I was make -j the gps_agent_pkg package, I met this error:

caffe_error

[100%] Building CXX object CMakeFiles/gps_agent_lib.dir/src/util.cpp.o
Building CXX object CMakeFiles/gps_agent_lib.dir/src/neuralnetworkcaffe.cpp.o
Building CXX object CMakeFiles/gps_agent_lib.dir/src/caffenncontroller.cpp.o
/home/ros/research/gps/src/gps_agent_pkg/src/caffenncontroller.cpp:1:27: fatal error: caffe/caffe.hpp: No such file or directory
#include "caffe/caffe.hpp"
^
compilation terminated.
make[2]: *** [CMakeFiles/gps_agent_lib.dir/src/caffenncontroller.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/ros/research/gps/src/gps_agent_pkg/src/neuralnetworkcaffe.cpp:1:0:
/home/ros/research/gps/src/gps_agent_pkg/include/gps_agent_pkg/neuralnetworkcaffe.h:10:27: fatal error: caffe/caffe.hpp: No such file or directory
#include "caffe/caffe.hpp"
^
compilation terminated.
In file included from /home/ros/research/gps/src/gps_agent_pkg/include/gps_agent_pkg/caffenncontroller.h:10:0,
from /home/ros/research/gps/src/gps_agent_pkg/src/robotplugin.cpp:16:
/home/ros/research/gps/src/gps_agent_pkg/include/gps_agent_pkg/neuralnetworkcaffe.h:10:27: fatal error: caffe/caffe.hpp: No such file or directory
#include "caffe/caffe.hpp"
^
compilation terminated.

And this error should be solved bymake distribute in the caffe dir. Aftermake distribute successfully in the caffe dir, I compiledgps_agent_pkg.

gps_success.png

Robotics, ROS

Solving rospkg import error for gps (guided policy search)

I was trying to install gps on Ubuntu 14.04. Yet, an import error of rospkg popped out when I was compiling the gps package.

This link is useful, for users who do not understand the system very well, it is useful to solve problem. For me, all I need to do is to add the

vim ~/.bashrc 
export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.7/dist-packages 
source ~/.bashrc

The root cause of this error is that Python packages in /usr path do not exist in PYTHONPATH variable.

 

ROS

What is rospkg?

This package is part of Robot OS (ROS). It is a library for retrieving information about ROS packages and stacks. The rospkg Python module provides basic utilities for querying information about ROS packages, stacks, and distributions. There are several basic APIs: ROS environment, RosPack/RosStack, OS detection, and distributions.

AI/ML, Robotics

What do RL, Deep RL and IRL mean?

RL(Reinforcement learning) – An agent takes actions, and learns by maximizing the reward.

Deep RL – The model for an agent to take action is formed by a deep neural network. This enables the agent to have more complex behaviors.

IRL (Inverse Reinforcement learning) – An agent learns the reward function from the experiences.

Definition:

An easy-to-understand example: