Skip to content

Instantly share code, notes, and snippets.

@nzlz
nzlz / Fix
Created September 6, 2016 17:46
package_data={'gym': ['envs/mujoco/assets/*.xml', 'envs/classic_control/assets/*.png', 'envs/doom/assets/*.cfg', 'envs/gazebo/assets/launch/*.launch', 'envs/gazebo/assets/worlds/*']},
@nzlz
nzlz / cnn_model
Created September 12, 2016 07:28
model = Sequential()
model.add(Convolution2D(16, 8, 8, subsample=(2,2), init=lambda shape, name: normal(shape, scale=0.01, name=name), border_mode='same',input_shape=(img_channels,img_rows,img_cols)))
model.add(Activation('relu'))
#model.add(MaxPooling2D(pool_size=(2, 2)))
#model.add(Dropout(0.5))
model.add(Convolution2D(32, 4, 4, init=lambda shape, name: normal(shape, scale=0.01, name=name), border_mode='same'))
model.add(Activation('relu'))
#model.add(MaxPooling2D(pool_size=(2, 2)))
#model.add(Dropout(0.5))
@nzlz
nzlz / color bash, ps1
Created October 14, 2016 17:45
Color bash
PS1='\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\]\[\e[1;37m\] '
@nzlz
nzlz / 144hz
Last active October 23, 2016 01:01
Gpu downclock + set 144. add startup application
#!/bin/sh
xrandr --output DVI-D-0 --mode 1920x1080 --rate 144.00
#voltage error fix, downclock gpu
nvidia-settings -a [gpu:0]/GPUGraphicsClockOffset[2]=-30
Starting >>> mara_gazebo_plugins
--- stderr: mara_gazebo_plugins
/home/nestor/ros2_mara_ws/src/MARA/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp: In member function ‘void gazebo_plugins::MARAGazeboPluginRosPrivate::trajectoryAxis1Callback(trajectory_msgs::msg::JointTrajectory_<std::allocator<void> >::SharedPtr)’:
/home/nestor/ros2_mara_ws/src/MARA/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp:173:113: warning: unused parameter ‘msg’ [-Wunused-parameter]
void MARAGazeboPluginRosPrivate::trajectoryAxis1Callback(const trajectory_msgs::msg::JointTrajectory::SharedPtr msg)
^~~
/home/nestor/ros2_mara_ws/src/MARA/mara_gazebo_plugins/src/mara_gazebo_joint_plugin.cpp: In member function ‘void gazebo_plugins::MARAGazeboPluginRosPrivate::trajectoryAxis2Callback(trajectory_msgs::msg::JointTrajectory_<std::allocator<void> >::SharedPtr)’:
/home/nestor/ros2
Gazebo multi-robot simulator, version 9.5.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
Gazebo multi-robot simulator, version 9.5.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
gym@gym-pc:~/gym-gazebo/examples/turtlebot$ python circuit_turtlebot_lidar_qlearn.py
ROS_MASTER_URI=http://localhost:12803
GAZEBO_MASTER_URI=http://localhost:12804
Gazebo launched!
Unable to register with master node [http://localhost:12803]: master may not be running yet. Will keep trying.
... logging to /home/gym/.ros/log/8ec665be-016d-11e9-8d0a-448a5b44d923/roslaunch-gym-pc-12756.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
gym@gym-pc:~/gym-gazebo/examples/turtlebot$ python circuit_turtlebot_lidar_qlearn.py
ROS_MASTER_URI=http://localhost:12992
GAZEBO_MASTER_URI=http://localhost:12993
... logging to /home/gym/.ros/log/3c7cbf96-016e-11e9-8d0a-448a5b44d923/roslaunch-gym-pc-26380.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.
@nzlz
nzlz / tempgist
Last active December 17, 2018 10:43
nestor@n-pc:~/ros2_mara_ws/src/orocos_kinematics_dynamics/orocos_kinematics_dynamics/build$ cmake ..
-- The C compiler identification is GNU 7.3.0
-- The CXX compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
@nzlz
nzlz / err
Created December 18, 2018 15:42
nestor@n-pc:~/ros2_mara_ws/install/lib/mara_utils_scripts$ ros2 launch mara_gazebo mara.launch.py
plugins /home/nestor/ros2_mara_ws/install
mara /home/nestor/ros2_mara_ws/install/share/mara_gazebo_plugins
[ERROR] [launch]: exception occurred while executing process[spawn_entity.py-3]:
Traceback (most recent call last):
File "/opt/ros/crystal/lib/python3.6/site-packages/launch/actions/execute_process.py", line 423, in __execute_process
stderr_to_stdout=(self.__output == 'screen'),
File "/opt/ros/crystal/lib/python3.6/site-packages/osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py", line 140, in async_execute_process
stderr_to_stdout)
File "/opt/ros/crystal/lib/python3.6/site-packages/osrf_pycommon/process_utils/async_execute_process_asyncio/impl.py", line 48, in _async_execute_process_nopty