diff --git a/src/Mujoco_manrun/CMakeLists.txt b/src/Mujoco_manrun/CMakeLists.txt
index ca69c45f0b..3defea3a09 100644
--- a/src/Mujoco_manrun/CMakeLists.txt
+++ b/src/Mujoco_manrun/CMakeLists.txt
@@ -1,82 +1,62 @@
cmake_minimum_required(VERSION 3.0.2)
project(mujoco_manrun)
-## Compile as C++11, supported in ROS Kinetic and newer
-# add_compile_options(-std=c++11)
+if($ENV{ROS_DISTRO} STREQUAL "noetic")
+ set(PYTHON_EXECUTABLE /usr/bin/python3)
+else()
+ set(PYTHON_EXECUTABLE /usr/bin/python2)
+endif()
-## Find catkin macros and libraries
-## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
-## is used, also find other catkin packages
find_package(catkin REQUIRED COMPONENTS
- rospy
geometry_msgs
+ rospy
+ sensor_msgs
+ std_msgs
)
-## Uncomment this if the package has a setup.py. This macro ensures
-## modules and global scripts declared therein get installed
-## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
-# catkin_python_setup()
+catkin_python_setup()
-###################################
-## catkin specific configuration ##
-###################################
-## The catkin_package macro generates cmake config files for your package
-## Declare things to be passed to dependent projects
-## INCLUDE_DIRS: uncomment this if your package contains header files
-## LIBRARIES: libraries you create in this project that dependent projects also need
-## CATKIN_DEPENDS: catkin_packages dependent projects also need
-## DEPENDS: system dependencies of this project that dependent projects also need
catkin_package(
-# INCLUDE_DIRS include
-# LIBRARIES mujoco_manrun
-# CATKIN_DEPENDS rospy geometry_msgs
-# DEPENDS system_lib
+ CATKIN_DEPENDS
+ geometry_msgs
+ rospy
+ sensor_msgs
+ std_msgs
)
-###########
-## Build ##
-###########
-
-## Specify additional locations of header files
-## Your package locations should be listed before other locations
include_directories(
-# include
${catkin_INCLUDE_DIRS}
)
-#############
-## Install ##
-#############
-
-# all install targets should use catkin DESTINATION variables
-# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
+install(DIRECTORY scripts/
+ DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION}
+ FILES_MATCHING PATTERN "*.py"
+ PATTERN "__pycache__" EXCLUDE
+)
-## Mark executable scripts (Python etc.) for installation
-## in contrast to setup.py, you can choose the destination
-catkin_install_python(PROGRAMS
+catkin_install_python(PROGRAMS
scripts/main.py
- scripts/ros_handler.py
- scripts/keyboard_handler.py
- scripts/cpg_oscillator.py
- scripts/humanoid_stabilizer.py
- scripts/utils.py
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
-## Mark other files for installation (e.g. launch and bag files, etc.)
-install(DIRECTORY launch models
- DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
+install(DIRECTORY models/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/models
)
-#############
-## Testing ##
-#############
+install(DIRECTORY launch/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
+)
-## Add gtest based cpp test target and link libraries
-# catkin_add_gtest(${PROJECT_NAME}-test test/test_mujoco_manrun.cpp)
-# if(TARGET ${PROJECT_NAME}-test)
-# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
-# endif()
+install(DIRECTORY config/
+ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
+)
-## Add folders to be run by python nosetests
-# catkin_add_nosetests(test)
+if(CATKIN_ENABLE_TESTING)
+ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/test/")
+ install(DIRECTORY test/
+ DESTINATION ${CATKIN_PACKAGE_TEST_DESTINATION}
+ FILES_MATCHING PATTERN "*.py"
+ )
+ catkin_add_nosetests(test)
+ endif()
+endif()
diff --git a/src/Mujoco_manrun/humanoid.xml b/src/Mujoco_manrun/humanoid.xml
deleted file mode 100644
index a2c4a16fb5..0000000000
--- a/src/Mujoco_manrun/humanoid.xml
+++ /dev/null
@@ -1,267 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/Mujoco_manrun/launch/mujoco_manrun.launch b/src/Mujoco_manrun/launch/mujoco_manrun.launch
index f141c4abd7..1ba87cd3aa 100644
--- a/src/Mujoco_manrun/launch/mujoco_manrun.launch
+++ b/src/Mujoco_manrun/launch/mujoco_manrun.launch
@@ -1,4 +1,15 @@
-
+
+
+
+
+
diff --git a/src/Mujoco_manrun/g1_23dof.xml b/src/Mujoco_manrun/models/g1_23dof.xml
similarity index 100%
rename from src/Mujoco_manrun/g1_23dof.xml
rename to src/Mujoco_manrun/models/g1_23dof.xml
diff --git a/src/Mujoco_manrun/mimic_sites.xml b/src/Mujoco_manrun/models/mimic_sites.xml
similarity index 100%
rename from src/Mujoco_manrun/mimic_sites.xml
rename to src/Mujoco_manrun/models/mimic_sites.xml
diff --git a/src/Mujoco_manrun/scene.xml b/src/Mujoco_manrun/models/scene.xml
similarity index 100%
rename from src/Mujoco_manrun/scene.xml
rename to src/Mujoco_manrun/models/scene.xml
diff --git a/src/Mujoco_manrun/package.xml b/src/Mujoco_manrun/package.xml
index 65847b2ac2..93cbfc91c3 100644
--- a/src/Mujoco_manrun/package.xml
+++ b/src/Mujoco_manrun/package.xml
@@ -1,18 +1,30 @@
mujoco_manrun
- 0.0.0
- The mujoco_manrun package
-
- yskk
- TODO
+ 1.0.0
+ ROS封装的人形机器人Mujoco仿真包,支持CPG步态控制、标准ROS接口通信
+ your_name
+ MIT
+
catkin
rospy
geometry_msgs
+ sensor_msgs
+ std_msgs
+ tf2_ros
+ std_srvs
+
+
rospy
geometry_msgs
+ sensor_msgs
+ std_msgs
+ tf2_ros
+ std_srvs
+ rviz
+
catkin
diff --git a/src/Mujoco_manrun/setup.py b/src/Mujoco_manrun/setup.py
index 6f5630e1a7..a027a9fdc9 100644
--- a/src/Mujoco_manrun/setup.py
+++ b/src/Mujoco_manrun/setup.py
@@ -1,12 +1,10 @@
-## ! DO NOT MANUALLY INVOKE THIS setup.py, USE CATKIN INSTEAD
-
-from distutils.core import setup
+from setuptools import setup
from catkin_pkg.python_setup import generate_distutils_setup
-# fetch values from package.xml
setup_args = generate_distutils_setup(
- packages=['mujoco_manrun'],
- package_dir={'': 'scripts'},
+ packages=[],
+ package_dir={"": "scripts"},
+ scripts=["scripts/main.py"]
)
setup(**setup_args)