Using Rviz Marker Messages for Visualizing tf2_ros/transform_broadcaster
System Info: These packages were tested on Ubuntu 22.04 with ROS Humble.
Open Terminal
mkdir ros2_ws
cd ros2_ws && mkdir src
cd src
After cloning the repo and building it, just type ros2 launch rviz_marker display_marker.launch.py
into the terminal to get started.
This will launch Rviz and show a 10x10 grid
Then type ros2 run agent service_test
on another terminal to display the agent marker on the grid
Ready to update goal pose for agent
To Broadcast Transforms type ros2 service call /update_goal my_robot_interfaces/srv/UpdateGoal "goal_pose:
(hit tab)
position:
x: 0.0
y: 0.0
z: 0.0
orientation:
x: 0.0
y: 0.0
z: 0.0
w: 1.0"
Send a Geometry Pose msg to call the service
tf2_ros.mp4
- Install Xhost for GUI:
xhost +local:docker
-
Build the Dockerfile:
docker build -t my_ros_container .
-
Run the docker container :
docker run -it --rm --net=host --privileged \ --env="DISPLAY" \ --env="QT_X11_NO_MITSHM=1" \ --volume="/tmp/.X11-unix:/tmp/.X11-unix:rw" \ -v "~/Path_of_your_choice/ros2_ws/src:/ros2_ws/src" \ -p 2222:22 \ ros2-humble-gazebo