-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Break up bitbots wolfgang folder #607
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
This package provides a PyBullet simulation environment with ROS topic support for the Wolfgang Robot. | ||
This package provides a PyBullet simulation environment with ROS topic support. | ||
|
||
There are different options to use this: | ||
1. Start the simulation with interface `rosrun wolfgang_pybullet_sim simulation_with_gui.py` | ||
2. Start the simulation without interface `rosrun wolfgang_pybullet_sim simulation_headless.py` | ||
1. Start the simulation with interface `rosrun bitbots_pybullet_sim simulation_with_gui.py` | ||
2. Start the simulation without interface `rosrun bitbots_pybullet_sim simulation_headless.py` | ||
3. Use the python class `Simulation` in `simulation.py` to directly run a simulation without using ROS | ||
Comment on lines
+4
to
+5
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Found remaining references to 'wolfgang' that need to be updated The package rename is not complete. Found references to 'wolfgang' in
These references should be updated to maintain consistency with the package rename from 'wolfgang' to 'bitbots'. 🔗 Analysis chainVerify complete package rename across the codebase. Let's ensure there are no remaining references to the old package name. Let me check the content of these files to verify if there are any remaining references to the old package name. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining references to the old package name
echo "Checking for remaining references to wolfgang_pybullet_sim..."
rg "wolfgang_pybullet_sim" --type-add 'launch:*.launch' --type-add 'xml:*.xml' -t python -t launch -t xml
# Check if the package name is consistently used in launch files
echo "Checking launch files for package references..."
fd . -e launch -e xml -e py | xargs grep -l "pybullet_sim"
Length of output: 898 Script: #!/bin/bash
# Check content of the identified files for any remaining 'wolfgang' references
echo "=== Checking simulation.py ==="
cat bitbots_simulation/bitbots_pybullet_sim/bitbots_pybullet_sim/simulation.py | grep -i "wolfgang"
echo -e "\n=== Checking simulation.launch ==="
cat bitbots_simulation/bitbots_pybullet_sim/launch/simulation.launch | grep -i "wolfgang"
echo -e "\n=== Checking package.xml ==="
cat bitbots_simulation/bitbots_pybullet_sim/package.xml | grep -i "wolfgang"
echo -e "\n=== Checking simulation_headless.py ==="
cat bitbots_simulation/bitbots_pybullet_sim/scripts/simulation_headless.py | grep -i "wolfgang"
echo -e "\n=== Checking simulation_with_gui.py ==="
cat bitbots_simulation/bitbots_pybullet_sim/scripts/simulation_with_gui.py | grep -i "wolfgang"
echo -e "\n=== Checking setup.py ==="
cat bitbots_simulation/bitbots_pybullet_sim/setup.py | grep -i "wolfgang"
echo -e "\n=== Checking ros_interface.py ==="
cat bitbots_simulation/bitbots_pybullet_sim/src/bitbots_pybullet_sim/ros_interface.py | grep -i "wolfgang"
Length of output: 1442 🧰 Tools🪛 LanguageTool
|
||
|
||
Shortcuts in gui: | ||
|
@@ -15,4 +15,4 @@ Shortcuts in gui: | |
|
||
`s` hold to step while pausing | ||
|
||
`n` gravity on/off | ||
`n` gravity on/off |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<launch> | ||
<arg name="gui" default="true"/> | ||
|
||
<group if="$(var gui)"> | ||
<node pkg="bitbots_pybullet_sim" exec="simulation_with_gui.py" name="pybullet_sim" output="screen"> | ||
<param from="$(find-pkg-share bitbots_pybullet_sim)/config/config.yaml"/> | ||
</node> | ||
</group> | ||
<group unless="$(var gui)"> | ||
<node pkg="bitbots_pybullet_sim" exec="simulation_headless.py" name="pybullet_sim" output="screen"> | ||
<param from="$(find-pkg-share bitbots_pybullet_sim)/config/config.yaml"/> | ||
</node> | ||
</group> | ||
<include file="$(find-pkg-share bitbots_webots_sim)/launch/imu_filter_sim.launch"> | ||
<arg name="sim" value="true"/> | ||
</include> | ||
</launch> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
<?xml version="1.0"?> | ||
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?> | ||
<package format="3"> | ||
<name>wolfgang_pybullet_sim</name> | ||
<name>bitbots_pybullet_sim</name> | ||
<version>1.3.0</version> | ||
<description>Simulation environment using PyBullet for Wolfgang robot.</description> | ||
<description>Simulation environment using PyBullet.</description> | ||
|
||
<maintainer email="[email protected]">Marc Bestmann </maintainer> | ||
<maintainer email="[email protected]">Hamburg Bit-Bots</maintainer> | ||
|
@@ -21,15 +21,15 @@ | |
<depend>rosgraph_msgs</depend> | ||
<depend>std_msgs</depend> | ||
<depend>bitbots_docs</depend> | ||
<depend>wolfgang_webots_sim</depend> | ||
<depend>bitbots_webots_sim</depend> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent package renaming detected across the codebase The verification reveals that there are still several packages that retain the "wolfgang" prefix and are actively used as dependencies:
This indicates that while some packages like 🔗 Analysis chainDependency update is consistent with package renaming. The dependency has been properly updated from Let's verify that all wolfgang references have been removed from dependencies: Let me check the content of these package.xml files to understand if these are actual inconsistencies or if they are separate packages that intentionally retain the "wolfgang" prefix. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any remaining "wolfgang" references in package.xml files
# Expected: No matches should be found
rg -l "wolfgang" --type xml
Length of output: 210 Script: #!/bin/bash
# Check the content of the found package.xml files
for file in bitbots_robot/wolfgang_moveit_config/package.xml bitbots_robot/wolfgang_description/package.xml bitbots_robot/wolfgang_animations/package.xml bitbots_misc/bitbots_bringup/package.xml; do
echo "=== $file ==="
cat "$file"
echo -e "\n"
done
Length of output: 6992 |
||
<depend>tf_transformations</depend> | ||
<depend>python3-transforms3d</depend> | ||
<depend>python3-numpy</depend> | ||
|
||
<export> | ||
<bitbots_documentation> | ||
<status>unknown</status> | ||
<language>python</language> | ||
</bitbots_documentation> | ||
<bitbots_documentation> | ||
<status>unknown</status> | ||
<language>python</language> | ||
</bitbots_documentation> | ||
</export> | ||
</package> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,9 @@ | |
import threading | ||
|
||
import rclpy | ||
from bitbots_pybullet_sim.ros_interface import ROSInterface | ||
from bitbots_pybullet_sim.simulation import Simulation | ||
Comment on lines
+5
to
+6
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification I can now generate the final response based on the gathered information. The package structure shows a potential issue with duplicate module files that needs to be addressed. Module duplication detected - needs cleanup The import statements are correct, but there's a concerning duplication of the imported modules in two locations:
While the package.xml is properly set up with the correct package name Recommendation:
🔗 Analysis chainLGTM! Verify package setup. The import changes align with the PR objective of removing the "wolfgang" prefix. The functionality remains unchanged. Let's verify the package setup: Let me gather more information to verify the package structure, particularly focusing on the package.xml location and content. The previous results showed multiple copies of ros_interface.py and simulation.py in different locations, which could indicate a potential issue. We need to verify the correct package structure and ensure there's no duplication that could cause import conflicts. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that the package structure is properly set up
# and that the imported modules exist in the new location
# Test 1: Check if the package.xml exists and contains the correct package name
echo "Checking package.xml..."
rg -l "bitbots_pybullet_sim" "**/package.xml"
# Test 2: Verify the existence of the imported modules
echo "Checking for imported modules..."
fd -t f "ros_interface.py|simulation.py" -x echo "Found: {}"
Length of output: 557 Script: #!/bin/bash
# Let's check the exact location of package.xml and its content
echo "Searching for package.xml in bitbots_simulation directory..."
fd "package.xml" bitbots_simulation/
echo -e "\nChecking content of found package.xml files..."
fd "package.xml" bitbots_simulation/ -x cat {}
echo -e "\nVerifying the correct module structure..."
# Check if there are multiple copies of the same modules
ls -R bitbots_simulation/bitbots_pybullet_sim/
Length of output: 5523 |
||
from rclpy.node import Node | ||
from wolfgang_pybullet_sim.ros_interface import ROSInterface | ||
from wolfgang_pybullet_sim.simulation import Simulation | ||
|
||
if __name__ == "__main__": | ||
rclpy.init(args=None) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
This package bridges between the [official Humanoid League RoboCup Proto3 API](https://cdn.robocup.org/hl/wp/2021/05/v-hsc_simulator_api_v1.0.pdf) and our ROS topics for the Wolfgang Robot. | ||
This package bridges between the [official Humanoid League RoboCup Proto3 API](https://cdn.robocup.org/hl/wp/2021/05/v-hsc_simulator_api_v1.0.pdf) and our ROS topics. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,62 @@ | ||||||
{ | ||||||
"name": "Bit-Bots", | ||||||
"players": { | ||||||
"1": { | ||||||
"proto": "Wolfgang", | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Update prototype name to align with PR objectives The - "proto": "Wolfgang",
+ "proto": "BitBots" 📝 Committable suggestion
Suggested change
|
||||||
"dockerTag": "latest", | ||||||
"dockerCmd": "roslaunch bitbots_robocup_api robocup_walk.launch", | ||||||
"halfTimeStartingPose": { | ||||||
"translation": [ | ||||||
-3.6, | ||||||
-3.20, | ||||||
0.43 | ||||||
], | ||||||
"rotation": [ | ||||||
0.13, | ||||||
-0.13, | ||||||
-0.98, | ||||||
-1.57 | ||||||
] | ||||||
}, | ||||||
"reentryStartingPose": { | ||||||
"translation": [ | ||||||
-3.6, | ||||||
-3.20, | ||||||
0.43 | ||||||
], | ||||||
"rotation": [ | ||||||
0.0, | ||||||
-0.0, | ||||||
-1.0, | ||||||
-1.57 | ||||||
] | ||||||
}, | ||||||
"shootoutStartingPose": { | ||||||
"translation": [ | ||||||
2.6, | ||||||
0, | ||||||
0.43 | ||||||
], | ||||||
"rotation": [ | ||||||
0, | ||||||
0.98, | ||||||
0.13, | ||||||
0.26 | ||||||
] | ||||||
}, | ||||||
"goalKeeperStartingPose": { | ||||||
"translation": [ | ||||||
-4.47, | ||||||
0, | ||||||
0.43 | ||||||
], | ||||||
"rotation": [ | ||||||
-0.13, | ||||||
0, | ||||||
0.98, | ||||||
3.14 | ||||||
] | ||||||
} | ||||||
} | ||||||
} | ||||||
} | ||||||
Comment on lines
+1
to
+62
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Consider extracting common values into configuration constants The robot height (0.43) is repeated across all poses. Consider restructuring the JSON to define common values at the root level to improve maintainability. {
"name": "Bit-Bots",
+ "constants": {
+ "robotHeight": 0.43
+ },
"players": {
"1": {
"proto": "Wolfgang",
"dockerTag": "latest",
"dockerCmd": "roslaunch bitbots_robocup_api robocup_walk.launch",
"halfTimeStartingPose": {
"translation": [
-3.6,
-3.20,
- 0.43
+ "${constants.robotHeight}"
],
// ... similar changes for other poses
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
<?xml version="1.0"?> | ||
<launch> | ||
<node pkg="hlvs_player" exec="hlvs_player" output="screen"> | ||
<param name="devices_file" value="$(find-pkg-share wolfgang_robocup_api)/config/devices.json"/> | ||
<param name="devices_file" value="$(find-pkg-share bitbots_robocup_api)/config/devices.json"/> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification All referenced files exist, but command_proxy needs path update Based on the verification results:
The launch file needs to be updated to reflect the correct path for the command_proxy node, as it's still located under the 🔗 Analysis chainVerify referenced files exist in new package locations. The package references have been consistently updated from Also applies to: 11-11, 15-15 Let me try a different approach to verify the files since the previous paths weren't found. Let's search from the repository root. 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that all referenced files exist in their new locations
# Test 1: Check if devices.json exists
echo "Checking for devices.json..."
fd -t f "devices.json" -p "bitbots_robocup_api/config"
# Test 2: Check if command_proxy executable exists
echo "Checking for command_proxy..."
fd -t f "command_proxy" -p "bitbots_robocup_api"
# Test 3: Check if imu_filter_sim.launch exists
echo "Checking for imu_filter_sim.launch..."
fd -t f "imu_filter_sim.launch" -p "bitbots_webots_sim/launch"
Length of output: 715 Script: #!/bin/bash
# Search for the files from repository root
echo "Checking for devices.json..."
fd -t f "devices.json"
echo -e "\nChecking for command_proxy..."
fd -t f "command_proxy"
echo -e "\nChecking for imu_filter_sim.launch..."
fd -t f "imu_filter_sim.launch"
# Also let's check the directory structure to understand the package layout
echo -e "\nChecking directory structure..."
ls -R bitbots_simulation/
Length of output: 10080 |
||
<remap from="camera/image_raw" to="camera/image_proc"/> | ||
<remap from="imu/data" to="imu/data_raw"/> | ||
</node> | ||
<!-- The hlvs_player expects the joint command positions as a 'JointState' message. | ||
We therfore need to convert the messages from our custom 'JointCommand' message to the | ||
more common 'JointState' layout. --> | ||
<node pkg="wolfgang_robocup_api" exec="command_proxy" output="screen"> | ||
<node pkg="bitbots_robocup_api" exec="command_proxy" output="screen"> | ||
<remap from="input" to="DynamixelController/command"/> | ||
<remap from="output" to="joint_command"/> | ||
</node> | ||
<include file="$(find-pkg-share wolfgang_webots_sim)/launch/imu_filter_sim.launch" /> | ||
<include file="$(find-pkg-share bitbots_webots_sim)/launch/imu_filter_sim.launch" /> | ||
</launch> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[develop] | ||
script_dir=$base/lib/bitbots_robocup_api | ||
[install] | ||
install_scripts=$base/lib/bitbots_robocup_api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codebase verification
Found inconsistencies in package references that need attention
The verification revealed several issues that need to be addressed:
simulation.py
file still contains references to the old package structure:"wolfgang"
as a robot type identifier"wolfgang_description"
package for URDF pathThese references should be updated to maintain consistency with the new package naming scheme:
"wolfgang"
to an appropriate new namebitbots_description
)🔗 Analysis chain
LGTM: Project name change aligns with PR objectives.
The project name change from
wolfgang_pybullet_sim
tobitbots_pybullet_sim
is consistent with the PR's goal of removing the "wolfgang" prefix.Let's verify that all package references have been updated consistently:
The previous script execution seems to have been overwritten with different output. Let me generate a new script to properly verify the package name changes:
This script will help us:
Let's check the launch file to ensure it's using the new package name:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
Length of output: 312
Script:
Length of output: 1709
Script:
Length of output: 1545