Skip to content

Commit

Permalink
Proper way to install python scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanmunawar committed Feb 2, 2018
1 parent 653e3de commit eb8e267
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion scripts/cython_test/env.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class ChaiEnv:
step_jump = 0
while step_jump < self.n_skip_steps:
step_jump = self.obj_handle.sim_step_cur - self.obj_handle.sim_step_pre_update
time.sleep(0.0005)
time.sleep(0.00001)
if step_jump > self.n_skip_steps:
print 'WARN: Jumped {} steps, Default skip limit {} Steps'.format(step_jump, self.n_skip_steps)

Expand Down
3 changes: 2 additions & 1 deletion scripts/cython_test/world.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class World(WatchDog):
def update(self):
self.cmd.step_clock = not self.cmd.step_clock
self.acknowledge_wd()
self.pub.publish(self.cmd)

def clear_cmd(self):
self.cmd.enable_step_throttling = False
Expand All @@ -45,4 +46,4 @@ class World(WatchDog):
if self.is_wd_expired():
self.console_print('World')
self.clear_cmd()
self.pub.publish(self.cmd)
# self.pub.publish(self.cmd)
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup

# fetch values from package.xml
setup_args = generate_distutils_setup(packages=[''],
package_dir={'': 'scripts'},
)
d = generate_distutils_setup(
packages=['chai_env'],
scripts=[''],
package_dir={'': 'scripts'}
)

setup(**setup_args)
setup(**d)

0 comments on commit eb8e267

Please sign in to comment.