Skip to content
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

Keyboard commands and Rviz visualization [Go2] #47

Open
RiccardoZuppetti opened this issue Oct 29, 2024 · 6 comments
Open

Keyboard commands and Rviz visualization [Go2] #47

RiccardoZuppetti opened this issue Oct 29, 2024 · 6 comments

Comments

@RiccardoZuppetti
Copy link

RiccardoZuppetti commented Oct 29, 2024

Hi @abizovnuralem , since I do not have access to the physical Go2 I decided to try using that digital twin project.

Now, since I am already using Isaac Sim (4.2.0) and Isaac Lab (the latest version available) for another project , I have tried to adapt this implementation to the latest software versions.

Take into account that IsaacLab has been installed following this procedure, skipping this section, and everything works fine, from the standalone examples to some other related to RL.

In particular, following this guide, I've made the following changes:

  • each occurrence of orbit within the project has been replaced with lab

  • each occurrence of RLTaskEnvCfg has been replaced with ManagerBasedRLEnvCfg

  • removed the --cpu flag within the custom_rl_env.py script (since not supported anymore in the latest IsaacLab)

At this point, after that the repo has been cloned, I've performed this step, and finally I've modified the run_sim.sh file (since I do not have a conda env for IsaacLab):

source /opt/ros/${ROS_DISTRO}/setup.bash
cd IsaacSim-ros_workspaces/${ROS_DISTRO}_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build
source install/setup.bash
cd ../..
cd go2_omniverse_ws
rosdep install --from-paths src --ignore-src -r -y
colcon build
source install/setup.bash
cd ..

# eval "$(conda shell.bash hook)"
# conda activate isaaclab
# export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libstdc++.so.6

# Run the Python script
cd ..
cd IsaacLab
./isaaclab.sh -p /home/user/go2_omniverse/main.py --robot_amount 1 --robot go2 --device cuda

Starting everything, I notice that:

  1. the keyboard commands do not control the movement of the robot
  2. within rviz2 I'm able to visualize only the camera stream

Is there something that can be done to solve that? Are you planning to port this entire project to work with IsaacSim 4.2.0 and the latest IsaacLab?

@abizovnuralem
Copy link
Owner

Hello! Have you tried https://github.com/abizovnuralem/go2_omniverse/tree/added_copter ? It supports the latest version

@RiccardoZuppetti
Copy link
Author

RiccardoZuppetti commented Oct 29, 2024

Probably in the clone on this repo there is not specified the branch to which refer.

On top, regarding the Ros2 Sdk that can be used with this digital twin project, how should I declare the ROBOT_IP and the CONN_TYPE env vars since everything is running on my local machine?

@RiccardoZuppetti
Copy link
Author

Quick update: the clone command in the README should be updated by putting the -b added_copter arg. On top, from the omniverse_sim.py I've removed everything that concerns copter. Starting the simulation, now I'm able to control the Go2 with WASD.

Then, regarding the Ros2 SDK, I've built the humble_ws with the content that can be found here, I've also added the env variables in order to allow the Ros2 communication:

# Isaac Sim ROS Variables
export ROS_DOMAIN_ID=0
export FASTRTPS_DEFAULT_PROFILES_FILE=/home/user/go2_omniverse/IsaacSim-ros_workspaces/humble_ws/fastdds.xml

and I've also added in there the env variables for the Go2 usage

export ROBOT_IP="machine_ip" (NOT 127.0.0.1)
export CONN_TYPE="webrtc"

By the way, trying to launch everything with ros2 launch go2_robot_sdk robot.launch.py command do not lead to see correctly the robot model, the map and so on. Is there something that I should fix?

@abizovnuralem
Copy link
Owner

By the way, trying to launch everything with ros2 launch go2_robot_sdk robot.launch.py command do not lead to see correctly the robot model, the map and so on. Is there something that I should fix?

Do you have screenshots? Can you send it here please?

@RiccardoZuppetti
Copy link
Author

Do you have screenshots? Can you send it here please?

Screenshot 2024-11-11 alle 11 48 36 Screenshot 2024-11-11 alle 11 48 15

Like I've said above, the IP to which the Ros2 SDK refers is the one of the machine, and the connection type is set as webrtc.

@abizovnuralem
Copy link
Owner

@RiccardoZuppetti can you please check this #52 comment please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants