Giter VIP home page Giter VIP logo

mini-pupper-aws's Introduction

MiniPupper AWS

The README is out of date.

Activity 1: Simulate the Dance Robot

Step 1: Setup the RoboMaker IDE

choose ROS Melodic

Step 2: Build the Robot and Simulation Applications

  • Clone Packages
cd ~/environment
git clone https://github.com/mangdangroboticsclub/mini-pupper-aws.git
  • Install Dependencies
sudo apt-get update
cd mini-pupper-aws/robot_ws
rosdep install --from src -i -y
  • Compile Robot Applications and Set Executable
colcon build
cd install/mini_pupper_dance/share/mini_pupper_dance/scripts/
sudo chmod +x *
  • Compile Simulation Package
cd ~/environment/mini-pupper-aws/simulation_ws/
colcon build

Step 3: Run the Simulation

  • Launch Simulation
# terminal 1
export DISPLAY=:1
source /opt/ros/melodic/setup.bash
source ~/environment/mini-pupper-aws/simulation_ws/install/setup.bash
source ~/environment/mini-pupper-aws/robot_ws/install/setup.bash
roslaunch mini_pupper_simulation aws_stage.launch
  • Launch Robot Application (Dancing Demo)
# terminal 2
source /opt/ros/melodic/setup.bash
source ~/environment/mini-pupper-aws/simulation_ws/install/setup.bash
source ~/environment/mini-pupper-aws/robot_ws/install/setup.bash
roslaunch mini_pupper_dance dance.launch hardware_connected:=false
  • Send a Message to Make Robot Dancing
# terminal 3
source /opt/ros/melodic/setup.bash
rostopic pub /dance_config std_msgs/String "data: 'demo'"

Step 4: Modify the Dance Routine

  • Create a new Python file in the robot application folder. Example: my_demo.py
cd ~/environment/mini-pupper-aws/routines
touch my_demo.py
  • Copy this template into the new file.
#!/usr/bin/env python

# the duration of every command
interval_time = 0.6 # seconds

# there are 10 commands you can choose:
# move_forward: the robot will move forward
# move_backward: the robot will move backward
# move_left: the robot will move to the left
# move_right: the robot will move to the right
# look_up: the robot will look up
# look_down: the robot will look down
# look_left: the robot will look left
# look_right: the robot will look right
# stop: the robot will stop the last command and return to the default standing posture
# stay: the robot will keep the last command
dance_commands = [
'move_forward',
'stop',
'look_down',
'look_up',

'move_backward',
'stop',
'look_left',
'look_right',

'move_left',
'stop',
'look_up',
'look_left',

'move_right',
'stop',
'look_down',
'look_right',

'look_up',
'look_left',
'look_down',
'look_right',

'look_down',
'look_left',
'look_up',
'look_right'
]
  • Modify the file, changing the name, artist, and the dance steps.
  • Save your new dance routine. If not already open, open two command line tabs in the RoboMaker IDE.
  • Build and Source and run the ROS application.
# terminal 1, launch simulation
export DISPLAY=:1
source /opt/ros/melodic/setup.bash
source ~/environment/mini-pupper-aws/simulation_ws/install/setup.bash
source ~/environment/mini-pupper-aws/robot_ws/install/setup.bash
roslaunch mini_pupper_simulation aws_stage.launch
# terminal 2, launch robot application
source /opt/ros/melodic/setup.bash
source ~/environment/mini-pupper-aws/simulation_ws/install/setup.bash
source ~/environment/mini-pupper-aws/robot_ws/install/setup.bash
roslaunch mini_pupper_dance dance.launch hardware_connected:=false
  • Send a Message to Make Robot Dance
# terminal 3, send a message to specify which dance routine you choose
source /opt/ros/melodic/setup.bash
rostopic pub /dance_config std_msgs/String "data: 'my_demo'"

Activity 2: Deploy and Run the Dance Robot

We haven't done this greengrass part yet. If you want to test the dancing routines on real robot, please refer to the follow instructions. The repository cloned on real robot is the same repository cloned in this repo. Please also refer to our pre-build image file, 20220521.1707.V0.2.MiniPupper_remars_RoboMakerSimulation.ROS_Ubuntu21.10.0.img.

# on Mini Pupper's Terminal
# clone this repo
# if you use our pre-build image file,no need to execute the below 4 line commands
cd ~
git clone https://github.com/mrkoz/mini-pupper-aws.git
cd mini-pupper-aws/robot_ws
catkin_make
# terminal 1
source /opt/ros/melodic/setup.bash
source ~/mini-pupper-aws/robot_ws/devel/setup.bash
roslaunch mini_pupper_dance dance.launch dance_config_path:=/home/ubuntu/mini-pupper-aws/routines
# terminal 2
source /opt/ros/melodic/setup.bash
rostopic pub /dance_config std_msgs/String "data: 'demo'"

As for control in Docker, please refer to the below setting and the pre-build image sample mini_pupper_remars_docker_IPDisplay.20220513.

sudo docker run -id --name ros_noetic --network host \
--privileged -v /dev:/dev -e DISPLAY=$DISPLAY -e QT_X11_NO_MITSHM=1 \
-v /sys/class/pwm:/sys/class/pwm \
-v /sys/bus/i2c/devices/3-0050/eeprom:/sys/bus/i2c/devices/3-0050/eeprom \
-v /sys/class/pwm:/sys/class/pwm \
-v /sys/bus/i2c/devices/3-0050/eeprom:/sys/bus/i2c/devices/3-0050/eeprom \
0nhc/mnpp:test
sudo xhost +

Attribution

"Simple Concert Stage" by mertbbicak is licensed under CC BY 4.0. AWS banner has been added to the model.

mini-pupper-aws's People

Contributors

symmetryninja avatar mrkoz avatar mangdangroboticsclub avatar ngl-aws avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.