首页
网站开发
桌面应用
管理软件
微信开发
App开发
嵌入式软件
工具软件
数据采集与分析
其他
首页
>
> 详细
program代做、代写C++设计程序
项目预算:
开发周期:
发布时间:
要求地区:
April 8, 2024
Advanced Topics for Robotics
Homework 1
Introduction
In this assignment, you will learn and practice setting up the robotics development environments
and using a powerful open-source codebase to run Model Predictive Control (MPC) for a
quadrupedal robot.
Specifically, you will first set up necessary development tools such as Robot Operating System
(ROS). ROS is a set of software libraries and tools that help you build robot applications, from
drivers to state-of-the-art algorithms, and with powerful developer tools. For more details, please
see ROS tutorials.
You will then install one of the state-of-the-art MPC solver called Optimal Control for Switched
Systems (OCS2). OCS2 is a C++ toolbox that provides an efficient implementation of several
advanced MPC algorithms such as Sequential Quadratic Programming (SQP) and Differential
Dynamic Programming (DDP).
To begin with, you need to follow the step-by-step instructions to install and configure the
development environments as well as OCS2. Once you have completed the configuration, you will
receive 60% of the homework marks.
After completing the configuration, you will need to modify a bit of the OCS2 code based on the
given tips to enable the quadruped robot to execute two new gaits. This section will account for
40% of your mark for this assignment.
Please note:
Before beginning this task, please be aware that you may need to configure a virtual machine
and install an operating system to complete this assignment.
Collaboration policy. Discussions with others are encouraged. However, you should
implement the idea on your own.
If you have any questions about this assignment, please don't hesitate to reach out to Prof.
Chen or the TA : )
Prerequisites
The following are the prerequisites for compiling and running OCS2:
Ubuntu 20.04. We strongly recommend that you use the Ubuntu 20.04 operating system for
this assignment. OCS2 is tested under Ubuntu 20.04 with library versions as provided in the
package sources. If your computer's operating system is not Ubuntu 20.04, you can also use
VMware to build a virtual machine. It is not recommended to use other common virtual
machines, such as Parallel Desktop and VirtualBox, because the limitation of graphics
memory may lead to poor rendering effects.
2-core processor (Intel/AMD CPU).
The minimum requirement for the processor is 2-core, but we highly recommend
using 4-core processor.
6GB RAM.
While the minimum requirement for RAM is 6GB, we strongly suggest using 10GB RAM
for optimal performance.
30 GB of free hard disk space.
You can download the desktop image for Ubuntu 20.04 from: https://releases.ubuntu.com/20.04/ .
If your operating system is Windows or Linux, you may consider using VMware Workstation
Player as your virtual machine.
If your operating system is macOS, you may consider using VMware Fusion as your virtual
machine.
Dependencies
Please run sudo apt update && sudo apt upgrade in the command-line interface to ensure the
source of each package.
C++ compiler with C++11 support (Default package in Ubuntu 20.04).
Eigen (v3.3) (Default package in Ubuntu 20.04).
Boost C++ (v1.71) (Default package in Ubuntu 20.04).
ROS (Noetic). Ubuntu install of ROS Noetic.
GLPK, URDFDOM, OCTOMAP, ASSIMP sudo apt install libglpk-dev liburdfdom-dev
liboctomap-dev libassimp-dev .
catkin. (When you install ROS, it will be installed together.)
pybind11_catkin, ROS package, installable via sudo apt install ros-noetic-pybind11-
catkin ros-noetic-grid-map-rviz-plugin .
catkin-pkg package for python3. Install with sudo apt install python3-catkin-tools .
Doxygen for documentation. Install with sudo apt install doxygen doxygen-latex
Git. Install with sudo apt install git .
If you find that using the apt command is slow, you can refer to https://mirrors.tuna.tsinghua.ed
u.cn/help/ubuntu/ to change the source of apt. However, this is not a necessary step.
Installation and setup
1. Create a new catkin workspace:
Catkin is a build system used primarily within the Robot Operating System (ROS) ecosystem. It is
designed to manage the compilation, packaging, and distribution of multiple interdependent software
packages, or "packages," that make up a ROS project. Catkin streamlines the build process by handling
dependencies, ensuring that packages are built in the correct order, and allowing for easy integration
with other tools in the ROS ecosystem.
2. Clone the OCS2 and other necessary libraries:
Software packages used in the project are placed in the src folder of the workspace.
3. Remove packages that are not useful for this homework:
4. Build and run the unit tests:
# Create the directories
# Do not forget to change <...> parts
# You can use any
and
.
# In my personal experiment,
# I choose `~/workstation`(without quotes) for
,
# and `hw1`(without quotes) for
.
mkdir -p
/
/src
cd
/
/
# Initialize the catkin workspace
catkin init
catkin config --extend /opt/ros/noetic
catkin config -DCMAKE_BUILD_TYPE=RelWithDebInfo
# Navigate to the directory of src
# Do not forget to change <...> parts
cd
/
/src
# Clone OCS2, pinocchio, hpp-fcl, and ocs2_robotic_assets.
git clone https://github.com/leggedrobotics/ocs2.git
git clone --recurse-submodules https://github.com/leggedrobotics/pinocchio.git
git clone --recurse-submodules https://github.com/leggedrobotics/hpp-fcl.git
git clone https://github.com/leggedrobotics/ocs2_robotic_assets.git
# Navigate to the directory of ocs2
# Do not forget to change <...> parts
cd
/
/src/ocs2
rm -rf ocs2_mpcnet
rm -rf ocs2_raisim
# Navigate to the directory of src
cd
/
/src
# Build it
catkin build ocs2
# Source it
source
/
/devel/setup.bash
# run tests
catkin run_tests ocs2
The command source would load a configuration file for the bash. Note that each time you open a
new terminal for running your code in your ROS workspace, you need to source the corresponding bash
file in that workspace.
If you encounter the "C++: fatal error: Killed signal terminated program cc1plus" error in this
step, you can solve this issue by creating a swap partition as follows:
# Create partition paths.
sudo mkdir -p /var/cache/swap/
# Set the partition size.
# bs=64M is the block size, count=64 is the number of blocks,
# so the swap space size is bs*count=4096MB=4GB.
sudo dd if=/dev/zero of=/var/cache/swap/swap0 bs=64M count=64
# Set the directory permissions.
sudo chmod 0600 /var/cache/swap/swap0
# create SWAP file.
sudo mkswap /var/cache/swap/swap0
# Activate the SWAP file.
sudo swapon /var/cache/swap/swap0
# Check whether the SWAP information is correct.
sudo swapon -s
5. Run the example for legged robots:
``` bash
# Source workspace
# Do not forget to change <...> parts
source
/
/devel/setup.bash
# Launch the example for SQP
roslaunch ocs2_legged_robot_ros legged_robot_sqp.launch
roslaunch is a command-line tool in the Robot Operating System (ROS) that allows users to start and
manage multiple ROS nodes and their configurations using a launch file. It simplifies the process of
initializing complex robotic systems, making it easy to run and manage multiple nodes with their
corresponding parameters and configurations in a coordinated manner.
The above launch file is placed in
/
/src/ocs2/ocs2_robotic_examples/ocs2_legged_robot_
ros/launch/legged_robot_sqp.launch , which launches the corresponding software packages such
as MPC controller, gait scheduler and visualization.
And then, you can see a legged robot in the RViz window:
RViz, short for "ROS Visualization," is a 3D visualization tool for the Robot Operating System (ROS). It
provides a user-friendly interface to display sensor data, robot model representations, and other
relevant information in a 3D environment. RViz allows users to better understand the data collected by a
robot and offers a way to visualize the robot's state, movements, and interactions with its environment.
You should also see new terminal windows appear after you run the above roslaunch command.
One terminal is for specifying the gait type, please type trot in this terminal. Another terminal is
for specifying the destination for the robot to move to, please type 2 0 0 0 in this terminal.
Please record a video for your result to be submitted. In this way, you can get 60% points for this
homework. Feel free to play with this example by trying to enter any displacements and gaits in
the terminals. You can also explore the codebase if you are interested.
Design new gaits
You can simply modify
/
/src/ocs2/ocs2_robotic_examples/ocs2_legged_robot/
config/command/gait.info to design two new gaits for the quadruped robot.
When executing the trot gait, the quadruped robot's four feet will switch between the following
two patterns:
LF_RH: The left front (LF) and right hind (RH) feet are on the ground simultaneously, while the
right front and left hind feet are not.
RF_LH: The right front (RF) and left hind (LH) feet are on the ground simultaneously, while the
left front and right hind feet are not.
You need to now design two new gaits, galloping and jumping, each also switches between two
patterns, but the patterns are different from that of the trot gait.
For galloping, the two patterns are:
The left front and right front feet are on the ground simultaneously, while the left hind and
right hind feet are not.
The left hind and right hind feet are on the ground simultaneously, while the left front and
right front feet are not.
For jumping, the two patterns are:
All four feet are on the ground simultaneously, which is a stance pattern.
All four feet are in the air simultaneously, which is a fly pattern.
To complete it, you need to modify part 1 in the figure below and add some code similar to part 2.
Now, you are done with this assignment! Please remember to record the resulting video! Each gait
will constitute a 20% score.
Submit your homework
You need to pack the following four files into a zip file.
gait.info : the file you modified.
trot.mp4/.mpg : the video describes the result of running the example ( roslaunch
ocs2_legged_robot_ros legged_robot_sqp.launch ) with the built-in trot gait.
gallop.mp4/.mpg : the video to show the quadrupedal robot can do the galloping.
jumping.mp4/.mpg : the video to show the quadrupedal robot can do the jumping.
Note the videos should be in mp4 or mpg format. Then please name your zip file with your
student ID and submit it through Web Learning.
软件开发、广告设计客服
QQ:99515681
邮箱:99515681@qq.com
工作时间:8:00-23:00
微信:codinghelp
热点项目
更多
代做ceng0013 design of a pro...
2024-11-13
代做mech4880 refrigeration a...
2024-11-13
代做mcd1350: media studies a...
2024-11-13
代写fint b338f (autumn 2024)...
2024-11-13
代做engd3000 design of tunab...
2024-11-13
代做n1611 financial economet...
2024-11-13
代做econ 2331: economic and ...
2024-11-13
代做cs770/870 assignment 8代...
2024-11-13
代写amath 481/581 autumn qua...
2024-11-13
代做ccc8013 the process of s...
2024-11-13
代写csit040 – modern comput...
2024-11-13
代写econ 2070: introduc2on t...
2024-11-13
代写cct260, project 2 person...
2024-11-13
热点标签
mktg2509
csci 2600
38170
lng302
csse3010
phas3226
77938
arch1162
engn4536/engn6536
acx5903
comp151101
phl245
cse12
comp9312
stat3016/6016
phas0038
comp2140
6qqmb312
xjco3011
rest0005
ematm0051
5qqmn219
lubs5062m
eee8155
cege0100
eap033
artd1109
mat246
etc3430
ecmm462
mis102
inft6800
ddes9903
comp6521
comp9517
comp3331/9331
comp4337
comp6008
comp9414
bu.231.790.81
man00150m
csb352h
math1041
eengm4100
isys1002
08
6057cem
mktg3504
mthm036
mtrx1701
mth3241
eeee3086
cmp-7038b
cmp-7000a
ints4010
econ2151
infs5710
fins5516
fin3309
fins5510
gsoe9340
math2007
math2036
soee5010
mark3088
infs3605
elec9714
comp2271
ma214
comp2211
infs3604
600426
sit254
acct3091
bbt405
msin0116
com107/com113
mark5826
sit120
comp9021
eco2101
eeen40700
cs253
ece3114
ecmm447
chns3000
math377
itd102
comp9444
comp(2041|9044)
econ0060
econ7230
mgt001371
ecs-323
cs6250
mgdi60012
mdia2012
comm221001
comm5000
ma1008
engl642
econ241
com333
math367
mis201
nbs-7041x
meek16104
econ2003
comm1190
mbas902
comp-1027
dpst1091
comp7315
eppd1033
m06
ee3025
msci231
bb113/bbs1063
fc709
comp3425
comp9417
econ42915
cb9101
math1102e
chme0017
fc307
mkt60104
5522usst
litr1-uc6201.200
ee1102
cosc2803
math39512
omp9727
int2067/int5051
bsb151
mgt253
fc021
babs2202
mis2002s
phya21
18-213
cege0012
mdia1002
math38032
mech5125
07
cisc102
mgx3110
cs240
11175
fin3020s
eco3420
ictten622
comp9727
cpt111
de114102d
mgm320h5s
bafi1019
math21112
efim20036
mn-3503
fins5568
110.807
bcpm000028
info6030
bma0092
bcpm0054
math20212
ce335
cs365
cenv6141
ftec5580
math2010
ec3450
comm1170
ecmt1010
csci-ua.0480-003
econ12-200
ib3960
ectb60h3f
cs247—assignment
tk3163
ics3u
ib3j80
comp20008
comp9334
eppd1063
acct2343
cct109
isys1055/3412
math350-real
math2014
eec180
stat141b
econ2101
msinm014/msing014/msing014b
fit2004
comp643
bu1002
cm2030
联系我们
- QQ: 9951568
© 2021
www.rj363.com
软件定制开发网!