Skip to content

Commit

Permalink
Modifications to README file
Browse files Browse the repository at this point in the history
  • Loading branch information
aalmrad committed Oct 10, 2024
1 parent 8adefeb commit cebf73a
Showing 1 changed file with 6 additions and 85 deletions.
91 changes: 6 additions & 85 deletions clearpath/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,95 +82,16 @@ sudo apt install ros-humble-control-msgs

# Usage

1. If any simulation is running, make sure to close it before proceeding

2. Open a new terminal in the following directory:`~/workspace/ros2_kortex_ws/src/ros2_kortex/clearpath`

3. Run the following command to launch the entire system:
1. If any simulation is running, make sure to close it before proceeding. Also, make sure to use the following command to stop any trace from previous sessions:
```
./gen3_husky.sh
```

4. Wait until the entire system is launched then using the same terminal window, run the following command to launch to command script:
```
python3 commanding_script.py
killall ruby
```

5. In the simulation window switch to the keyboard tab in the teleop panel on the right side, then command the robot using the keyboard. Please refer to the instructions included in `~/workspace/ros2_kortex_ws/src/ros2_kortex/clearpath/instructions.txt` for more details about the available keyboard commands.
2. Open a new terminal in the following directory:`~/workspace/ros2_kortex_ws/src/ros2_kortex/clearpath`

**P.S.** Before restarting the simulation, make sure to use the following command to eliminate any leftovers from a previous iteration:
3. Run the following command to launch the entire system and follow closely the step by step instructions:
```
killall ruby
./gen3_husky.sh
```

The following file "~/workspace/ros2_kortex_ws/install/clearpath_config/lib/python3.10/site-packages/clearpath_config/common/types/rmw_implementation.py" was modified to the following:
```
# Software License Agreement (BSD)
#
# @author Luis Camero <[email protected]>
# @copyright (c) 2023, Clearpath Robotics, Inc., All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# * Neither the name of Clearpath Robotics nor the names of its contributors
# may be used to endorse or promote products derived from this software
# without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
class RMWImplementation:
CONNEXT = "rmw_connext_cpp"
CYCLONE_DDS = "rmw_cyclonedds_cpp"
FAST_RTPS = "rmw_fastrtps_cpp"
GURUM_DDS = "rmw_gurumdds_cpp"
ALL_SUPPORTED = [CYCLONE_DDS]
DEFAULT = CYCLONE_DDS
def __init__(
self,
rmw: str = DEFAULT
) -> None:
self.assert_valid(rmw)
self.rmw = rmw
def __eq__(self, other: object) -> bool:
if isinstance(other, str):
return self.rmw == other
elif isinstance(other, RMWImplementation):
return self.rmw == other.rmw
else:
return False
def __str__(self) -> str:
return self.rmw
@classmethod
def is_valid(cls, rmw: str) -> bool:
return rmw in cls.ALL_SUPPORTED
@classmethod
def assert_valid(cls, rmw: str) -> None:
assert cls.is_valid(rmw), ("\n".join[
"RMW '%s' not supported." % rmw,
"RMW must be one of: '%s'" % cls.ALL_SUPPORTED
])
```

Also check and push the modifications on the clearpath_common and ros2_kortex
4. Once the entire system is up and running, in the simulation window switch to the keyboard tab in the teleop panel on the right side, then command the robot using the keyboard. Please refer to the instructions included in `~/workspace/ros2_kortex_ws/src/ros2_kortex/clearpath/instructions.txt` for more details about the available keyboard commands.

0 comments on commit cebf73a

Please sign in to comment.