1.X Testing the initial OpenR2 robot simulation

1.5.0 Starting the a simple robot simulation

By executing the launch file we will start up a few ros nodes...

  • joint_state_publisher joint values node
  • robot_state_publisher joint and link transform node
  • rviz simulation node
  • rosout log node
~$ echo $ROS_MASTER_URI
http://localhost:11311
~$ roslaunch openr2_robot_description openr2.rviz.launch

1.5.1 Listing the active running ROS nodes

Use the rosnode command to list all running ROS nodes.

~$ rosnode list 
/joint_state_publisher
/robot_state_publisher
/rosout
/rviz

1.5.2 Testing the joint_state_publisher topic

Test the /joint_state_publisher node by looking at the node, then looking at the published messages, then looking at the published messages after making a change to the joint values.

~$ rosnode info /joint_state_publisher
--------------------------------------------------------------------------------
Node [/joint_state_publisher]
Publications:
 * /joint_states [sensor_msgs/JointState]
 * /rosout [rosgraph_msgs/Log]

Subscriptions: None

Services:
 * /joint_state_publisher/get_loggers
 * /joint_state_publisher/set_logger_level

contacting node http://Ubuntu1804LTS:36713/ ...
Pid: 2080
Connections:
 * topic: /joint_states
    * to: /robot_state_publisher
    * direction: outbound
    * transport: TCPROS
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS

 

~$ rostopic echo -c -n 1 /joint_states

header:
  seq: 47050
  stamp:
    secs: 1539635502
    nsecs: 318255901
  frame_id: ''
name: [left_wheel_hinge, right_wheel_hinge]
position: [0.0, 0.0]
velocity: []
effort: []

 

~$ rostopic echo -c -n 1 /joint_states header

header:
  seq: 48436
  stamp:
    secs: 1539635640
    nsecs: 917918920
  frame_id: ''
name: [left_wheel_hinge, right_wheel_hinge]
position: [0.0, 1.7900794940154645]
velocity: []
effort: []
---

Notice that the name array contains a list of joint value labels. The actual values of the joints are in the position array in the same order as the name array.

1.5.3 Testing the robot_state_publisher topic

~$ rosnode info /robot_state_publisher
--------------------------------------------------------------------------------
Node [/robot_state_publisher]
Publications:
 * /rosout [rosgraph_msgs/Log]
 * /tf [tf2_msgs/TFMessage]
 * /tf_static [tf2_msgs/TFMessage]

Subscriptions:
 * /joint_states [sensor_msgs/JointState]

Services:
 * /robot_state_publisher/get_loggers
 * /robot_state_publisher/set_logger_level

contacting node http://Ubuntu1804LTS:40721/ ...
Pid: 2081
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /tf
    * to: /rviz
    * direction: outbound
    * transport: TCPROS
 * topic: /tf_static
    * to: /rviz
    * direction: outbound
    * transport: TCPROS
 * topic: /joint_states
    * to: /joint_state_publisher (http://Ubuntu1804LTS:36713/)
    * direction: inbound
    * transport: TCPROS

1.5.4 Testing the RViz simulator

~$ rosnode info /rviz
--------------------------------------------------------------------------------
Node [/rviz]
Publications:
 * /clicked_point [geometry_msgs/PointStamped]
 * /initialpose [geometry_msgs/PoseWithCovarianceStamped]
 * /move_base_simple/goal [geometry_msgs/PoseStamped]
 * /rosout [rosgraph_msgs/Log]

Subscriptions:
 * /tf [tf2_msgs/TFMessage]
 * /tf_static [tf2_msgs/TFMessage]

Services:
 * /rviz/get_loggers
 * /rviz/reload_shaders
 * /rviz/set_logger_level

contacting node http://Ubuntu1804LTS:40655/ ...
Pid: 2082
Connections:
 * topic: /rosout
    * to: /rosout
    * direction: outbound
    * transport: TCPROS
 * topic: /tf
    * to: /robot_state_publisher (http://Ubuntu1804LTS:40721/)
    * direction: inbound
    * transport: TCPROS
 * topic: /tf_static
    * to: /robot_state_publisher (http://Ubuntu1804LTS:40721/)
    * direction: inbound
    * transport: TCPROS

 

Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like1
  • 1 Likes
  • 5 mths agoLast active
  • 23Views
  • 1 Following