Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .catkin_workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file currently only serves to mark the location of a catkin workspace for tool integration
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/devel
/build

21 changes: 20 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,24 @@ source ./devel/setup.bash
```

# 5. launch simulation.launch and adjust the Spot pose
```
roslaunch simulation.launch
```
# Stand up Spot and move
Change the pose of '/' in gazebo pitch, yaw, roll to 0, 0, 0. Try multiple times until it works.


# 6. In another terminal, launch weeding_arm_sim.launch
# 6. In another terminal, launch weeding_arm_sim.launch, and follow example in arm_control repo to perform control
```
roselaunch weeding_arm_sim.launch
```
Then follow the arm_control repository


# 7. this command make us move Spot with keyboards
```
roslaunch champ_teleop teleop.launch
```


# A Docker image that has all the dependencies for running this simulation_env:
Expand All @@ -28,3 +44,6 @@ docker pull entao2000/spot_simulation
docker run --name spot_test -it -v `pwd`/rootfs:/root/rootfs -p 5901:5901 -p 6080:6080 -p 8888:8888 entao2000/spot_simulation
```
Then, Clone z1_controller and arm_control repository into the src folder, and follow steps from 1 to 6


https://github.com/gazebosim/gz-math
10 changes: 10 additions & 0 deletions ign-math/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CMake folders
build
build_*

# OS generated files
.DS_Store
*.swp

# Python generaated files
*.pyc
1 change: 1 addition & 0 deletions ign-math/AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
OSRFoundation
93 changes: 93 additions & 0 deletions ign-math/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
load(
"@gz//bazel/skylark:build_defs.bzl",
"GZ_FEATURES",
"GZ_ROOT",
"GZ_VISIBILITY",
"gz_configure_header",
"gz_export_header",
"gz_include_header",
)
load(
"@gz//bazel/lint:lint.bzl",
"add_lint_tests",
)

package(
default_visibility = GZ_VISIBILITY,
features = GZ_FEATURES,
)

licenses(["notice"]) # Apache-2.0

exports_files(["LICENSE"])

gz_configure_header(
name = "config",
src = "include/gz/math/config.hh.in",
cmakelists = ["CMakeLists.txt"],
package = "math",
)

gz_export_header(
name = "include/gz/math/Export.hh",
export_base = "GZ_MATH",
lib_name = "gz-math",
visibility = ["//visibility:private"],
)

public_headers_no_gen = glob([
"include/gz/math/*.hh",
"include/gz/math/detail/*.hh",
"include/gz/math/graph/*.hh",
])

private_headers = glob(["src/*.hh"])

sources = glob(
["src/*.cc"],
exclude = ["src/*_TEST.cc"],
)

gz_include_header(
name = "mathhh_genrule",
out = "include/gz/math.hh",
hdrs = public_headers_no_gen + [
"include/gz/math/config.hh",
"include/gz/math/Export.hh",
],
)

public_headers = public_headers_no_gen + [
"include/gz/math/config.hh",
"include/gz/math/Export.hh",
"include/gz/math.hh",
]

cc_library(
name = "math",
srcs = sources + private_headers,
hdrs = public_headers,
includes = ["include"],
deps = [
GZ_ROOT + "utils",
],
)

test_sources = glob(
[
"src/*_TEST.cc",
"src/graph/*_TEST.cc",
],
)

[cc_test(
name = src.replace("/", "_").replace(".cc", "").replace("src_", ""),
srcs = [src],
deps = [
":math",
"@gtest",
"@gtest//:gtest_main",
],
) for src in test_sources]

add_lint_tests()
141 changes: 141 additions & 0 deletions ign-math/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
cmake_minimum_required(VERSION 3.10.2 FATAL_ERROR)

#============================================================================
# Initialize the project
#============================================================================
project(gz-math7 VERSION 7.1.0)

#============================================================================
# Find gz-cmake
#============================================================================
# If you get an error at this line, you need to install gz-cmake
find_package(gz-cmake3 REQUIRED)

#============================================================================
# Configure the project
#============================================================================
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

gz_configure_project(VERSION_SUFFIX)

#============================================================================
# Set project-specific options
#============================================================================

option(SKIP_SWIG
"Skip generating ruby bindings via Swig"
OFF)

option(SKIP_PYBIND11
"Skip generating Python bindings via pybind11"
OFF)

include(CMakeDependentOption)
cmake_dependent_option(USE_SYSTEM_PATHS_FOR_RUBY_INSTALLATION
"Install ruby modules in standard system paths in the system"
OFF "NOT SKIP_SWIG" OFF)

cmake_dependent_option(USE_SYSTEM_PATHS_FOR_PYTHON_INSTALLATION
"Install python modules in standard system paths in the system"
OFF "NOT SKIP_PYBIND11" OFF)

cmake_dependent_option(USE_DIST_PACKAGES_FOR_PYTHON
"Use dist-packages instead of site-package to install python modules"
OFF "NOT SKIP_PYBIND11" OFF)

#============================================================================
# Search for project-specific dependencies
#============================================================================

#--------------------------------------
# Find gz-utils
gz_find_package(gz-utils2 REQUIRED)
set(GZ_UTILS_VER ${gz-utils2_VERSION_MAJOR})

#--------------------------------------
# Find eigen3
gz_find_package(
EIGEN3
REQUIRED_BY eigen3
PRETTY eigen3
PURPOSE "Provide conversions to eigen3 types")

########################################
# Include swig
if (SKIP_SWIG)
message(STATUS "SKIP_SWIG set - disabling SWIG Ruby support")
else()
find_package(SWIG QUIET)
if (NOT SWIG_FOUND)
GZ_BUILD_WARNING("Swig is missing: Language interfaces are disabled.")
message (STATUS "Searching for swig - not found.")
else()
message (STATUS "Searching for swig - found version ${SWIG_VERSION}.")
endif()

# Include other languages if swig was found
if (SWIG_FOUND)
########################################
# Include ruby
find_package(Ruby 1.9 QUIET)
if (NOT RUBY_FOUND)
GZ_BUILD_WARNING("Ruby is missing: Install ruby-dev to enable ruby interfaces.")
message (STATUS "Searching for Ruby - not found.")
else()
message (STATUS "Searching for Ruby - found version ${RUBY_VERSION}.")
endif()
endif()
endif()

########################################
# Python bindings
if (SKIP_PYBIND11)
message(STATUS "SKIP_PYBIND11 set - disabling python bindings")
else()
include(GzPython)
find_package(PythonLibs QUIET)
if (NOT PYTHONLIBS_FOUND)
GZ_BUILD_WARNING("Python is missing: Python interfaces are disabled.")
message (STATUS "Searching for Python - not found.")
else()
message (STATUS "Searching for Python - found version ${PYTHONLIBS_VERSION_STRING}.")

set(PYBIND11_PYTHON_VERSION 3)
find_package(Python3 QUIET COMPONENTS Interpreter Development)
find_package(pybind11 2.2 QUIET)

if (${pybind11_FOUND})
message (STATUS "Searching for pybind11 - found version ${pybind11_VERSION}.")
else()
GZ_BUILD_WARNING("pybind11 is missing: Python interfaces are disabled.")
message (STATUS "Searching for pybind11 - not found.")
endif()
endif()
endif()

# Location of "fake install folder" used in tests
# Defined here at root scope so it is available for tests in src and test folders
set(FAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/fake/install")

#============================================================================
# Configure the build
#============================================================================
gz_configure_build(QUIT_IF_BUILD_ERRORS
COMPONENTS eigen3)


#============================================================================
# Create package information
#============================================================================
gz_create_packages()

#============================================================================
# Configure documentation
#============================================================================
configure_file(${CMAKE_SOURCE_DIR}/api.md.in ${CMAKE_BINARY_DIR}/api.md)
configure_file(${CMAKE_SOURCE_DIR}/tutorials.md.in ${CMAKE_BINARY_DIR}/tutorials.md)

gz_create_docs(
API_MAINPAGE_MD "${CMAKE_BINARY_DIR}/api.md"
TUTORIALS_MAINPAGE_MD "${CMAKE_BINARY_DIR}/tutorials.md")
1 change: 1 addition & 0 deletions ign-math/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
See the [Gazebo contributing guide](https://gazebosim.org/docs/all/contributing).
Loading