diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..779a484 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "ros-docker-dev"] + path = ros-docker-dev + url = https://github.com/AlfredMoore/ros-docker-dev.git + branch = realtime \ No newline at end of file diff --git a/doc/docker_script.md b/doc/docker_script.md new file mode 100644 index 0000000..6c52e9d --- /dev/null +++ b/doc/docker_script.md @@ -0,0 +1,58 @@ + +### Optional: 3B. Seting Up Container with bash/zsh scripts +If you want to use bash script to set up your container, try the module [ros-docker-dev](../ros-docker-dev). +Features TLDR; + * User spoofing + * SSH forwarding + * Option to use zsh + * One-step building container + +#### Prerequisites +To make the git submodule [ros-docker-dev](../ros-docker-dev) work and up-to-date, you should firstly +initialize the submodule. +```bash +git submodule update --init --remote +``` +#### Options +We provide Options flag in this container. Please see [ros-docker-dev](../ros-docker-dev/README.md) for more details about this script and launching the containers. + * -n: Nocache or rebuild New image + * -b: use Bash instead of zsh + * -r: enable Realtime kernel + +#### Run Examples +##### Usually you can just run +```bash +cd ros-docker-dev +./enterpoint.sh -r +``` + +##### Example 1: Build or rebuild the image with no cache, enable realtime kernel. +```bash +cd ros-docker-dev +./enterpoint.sh -nr +``` +##### Example 2: Build and run image or enter an existing container, with realtime kernel. (-n will start rebuilding) +```bash +cd ros-docker-dev +./enterpoint.sh -r +``` + +:warning: **Note:** If the realtime kernel is not permitted as the regular user in the container, you could try `sudo -i` to activate the root user. + +#### Continue Setup +Now your container should be running and you should be in it's command line. Now setup the dependencies: +```bash +source /opt/ros/noetic/setup.zsh # or source /opt/ros/noetic/setup.bash if you are using bash +cd src/relaxed_ik_ros1/relaxed_ik_core +cargo build + +cd ${WORKSPACE_PATH} +sudo bash ros-docker-dev/init_scripts/NIST_Benchmark.sh + +catkin build +source devel/setup.bash # or source devel/setup.bash if you are using bash + +chmod +x ${WORKSPACE_PATH}/src/panda_benchmark/scripts/ +``` + +Then in your [run_simulation](./run_simulation.md) and [run_robot](./run_robot.md), you are supposed to use `simulation_b.launch` and `interface_b.launch`. diff --git a/doc/setup.md b/doc/setup.md index 0364985..9d96717 100644 --- a/doc/setup.md +++ b/doc/setup.md @@ -73,7 +73,6 @@ chmod +x /workspace/src/panda_benchmark/scripts/move_to_position.py ``` - ### 4. Set Up Franka Desktop Before you can run anything with the FCI, make sure joints are unlocked and FCI Control is enabled in the Franka desktop (our Desktops is at [192.168.1.2](https://192.168.1.2/desk/)). Directions for doing that are [here](https://youtu.be/91wFDNHVXI4?si=4-ZArdrxOMAiCc5H&t=484). WARNING: we could not get Firefox to access the desk because of security reasons. However we could access through chrome once we clicked "Advanced" > "Proceed to 192.168.1.2 (unsafe)". @@ -84,6 +83,7 @@ Now you are ready to run the robot or simulation by reference [run_robot.md](/do --- ### Notes +* Another [Docker option](./docker_script.md) to build, rebuild, run, execute images and containers with scripts faster. * If you make changes in any of the src C/C++ files, you'll need to run: diff --git a/ros-docker-dev b/ros-docker-dev new file mode 160000 index 0000000..bdf3c45 --- /dev/null +++ b/ros-docker-dev @@ -0,0 +1 @@ +Subproject commit bdf3c45ea5a36e0a8a78d8ea05d8d7231bbda78e diff --git a/src/franka_ros_interface/franka.sh b/src/franka_ros_interface/franka.sh index 7661f50..3ca0391 100755 --- a/src/franka_ros_interface/franka.sh +++ b/src/franka_ros_interface/franka.sh @@ -36,17 +36,17 @@ ## ========================================= # # ----- EDIT THIS TO MATCH THE IP OF THE FRANKA ROBOT CONTROLLER IN THE NETWORK -FRANKA_ROBOT_IP="FRANKA_ROBOT_IP.local" +FRANKA_ROBOT_IP="192.168.1.2" # ----- EDIT THIS TO MATCH YOUR IP IN THE NETWORK -your_ip="" +your_ip="192.168.1.5" # ----- EDIT THIS TO MATCH THE IP OF THE MAIN ROS MASTER PC (CONNECTED TO THE FRANKA CONTROLLER), # ----- ON WHICH THE Franka ROS Interface 'driver' NODES WILL BE RUNNING (SEE "USAGE EXPLAINED" BELOW). # ----- THIS VALUE IS NEEDED ONLY IF YOU WILL USE THE 'remote' ENVIRONMENT ON THIS MACHINE. ROS_MASTER_IP="" -ros_version="melodic" +ros_version="noetic" ## ========================================= # ## ========== USAGE EXPLAINED ============== # diff --git a/src/panda_benchmark/launch/interface_b.launch b/src/panda_benchmark/launch/interface_b.launch new file mode 100644 index 0000000..006d481 --- /dev/null +++ b/src/panda_benchmark/launch/interface_b.launch @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/src/panda_benchmark/launch/simulation_b.launch b/src/panda_benchmark/launch/simulation_b.launch new file mode 100644 index 0000000..f5903e5 --- /dev/null +++ b/src/panda_benchmark/launch/simulation_b.launch @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/src/panda_benchmark/scripts/__pycache__/transformations.cpython-38.pyc b/src/panda_benchmark/scripts/__pycache__/transformations.cpython-38.pyc index a2f2e3e..29b8608 100644 Binary files a/src/panda_benchmark/scripts/__pycache__/transformations.cpython-38.pyc and b/src/panda_benchmark/scripts/__pycache__/transformations.cpython-38.pyc differ