Ubuntu-Sim2Real环境配置(下)

cd ICRA-RM-Sim2Real/docker_client/
./exec_client.sh
cd ~
roslaunch rtab_navigation rtab_navigation.launch

执行上面代码的时候后台一直刷新

cd ICRA-RM-Sim2Real/docker_client/
./exec_client.sh
cd ~
roslaunch carto_navigation navigation.launch

 1.Usage

执行该代码的时候出现了下面的问题

使用下面代码打开bashrc文件

nano ~/.bashrc

将最后的下面的代码

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi

# >>> fishros initialize >>>
 source /opt/ros/noetic/setup.bash 
# <<< fishros initialize <<<

# >>> fishros scripts >>>
export PATH=$PATH:/home/see/.fishros/bin/ 
# <<< fishros scripts <<<

改为

# enable programmable completion features (you don't need to enable
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
# sources /etc/bash.bashrc).
if ! shopt -oq posix; then
  if [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
  elif [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
  fi
fi
source /opt/ros/kinetic/setup.bash
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/home/sz/catkin_ws/src
export ROS_HOSTNAME=localhost
export ROS_MASTER_URI=http://localhost:11311
#source ~/racecar/devel/setup.bash

不过当我重新跑代码的时候,变成了这样,我的rviz黑屏了

副了,所以我把前面的一步撤回,查看

参考下面的博客,但是学长劝我别删除,所以我没管

https://wenku.csdn.net/answer/8fc926b10bb8df864ba9fc7ffde92f4b

 Ubuntu虚拟机删除dev/loop_sudo apt autoremove --purge snapd-CSDN博客

配置下面代码的时候

cd ICRA-RM-Sim2Real/docker_client/
./exec_client.sh
roscd ep_detect_and_grasp
python3 detect_cube.py

出现了这个问题

(frame:406): Gdk-ERROR **: 05:10:35.111: The program 'frame' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadAccess (attempt to access private resource denied)'.
  (Details: serial 295 error_code 10 request_code 130 (MIT-SHM) minor_code 1)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the GDK_SYNCHRONIZE environment
   variable to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)
Trace/breakpoint trap (core dumped)

 

detect_cube.py:29: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.aruco_pose_pub = rospy.Publisher("aruco_pose", Pose)
detect_cube.py:31: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.aruco_sink1_pub = rospy.Publisher("aruco_sink1", Pose)
detect_cube.py:32: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.aruco_sink2_pub = rospy.Publisher("aruco_sink2", Pose)
detect_cube.py:33: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.aruco_sink3_pub = rospy.Publisher("aruco_sink3", Pose)
detect_cube.py:35: SyntaxWarning: The publisher should be created with an explicit keyword argument 'queue_size'. Please see http://wiki.ros.org/rospy/Overview/Publishers%20and%20Subscribers for more information.
  self.aruco_pose_image_pub = rospy.Publisher("aruco_pose_image", Image)
(50, 50)
(50, 50)
(50, 50)
(50, 50)
(50, 50)
(50, 50)

不过在我重复三次执行后,它可以调出frame画面,就是好像和指导书的不太一样就是了,无法操控它

运行下面代码的时候

cd ICRA-RM-Sim2Real/docker_client/
./exec_client.sh
roscd ep_detect_and_grasp
python3 grasp_cube.py

出现了这个问题

The publisher should be created with an explicit keyword argument 'queue_size'.

根据提示输入下面代码 注意括号前面有反斜杠 '\'

self.base_move_position_pub = rospy.Publisher\("cmd_position", Twist\)

出现下面的问题:

bash: self.base_move_position_pub: command not found

 查看链接

rospy/Overview/Publishers and Subscribers - ROS Wiki

再次运行下面的代码的时候

cd ICRA-RM-Sim2Real/docker_client/
./exec_client.sh
roscd ep_detect_and_grasp
python3 grasp_cube.py

虽然能出现一个frame窗口,但是有下面的信息提示:

 

相关推荐

  1. ROS2 ZEDX UBUNTU 环境配置

    2023-12-10 00:28:04       10 阅读
  2. 华纳云:UbuntuLAMP环境如何配置

    2023-12-10 00:28:04       37 阅读

最近更新

  1. TCP协议是安全的吗?

    2023-12-10 00:28:04       18 阅读
  2. 阿里云服务器执行yum,一直下载docker-ce-stable失败

    2023-12-10 00:28:04       19 阅读
  3. 【Python教程】压缩PDF文件大小

    2023-12-10 00:28:04       18 阅读
  4. 通过文章id递归查询所有评论(xml)

    2023-12-10 00:28:04       20 阅读

热门阅读

  1. MySQL注入入门简述

    2023-12-10 00:28:04       40 阅读
  2. CCF计算机软件能力认证考试—202209-1如此编码

    2023-12-10 00:28:04       28 阅读
  3. 高云GW1NSR-4C开发板上手使用

    2023-12-10 00:28:04       43 阅读
  4. 【Qt5】setWindowFlags的标志有哪些?

    2023-12-10 00:28:04       30 阅读
  5. 车联网安全学习路标

    2023-12-10 00:28:04       40 阅读
  6. 如何访问内部网络做内网穿透

    2023-12-10 00:28:04       41 阅读
  7. GO设计模式——7、适配器模式(结构型)

    2023-12-10 00:28:04       28 阅读
  8. VueUse工具库

    2023-12-10 00:28:04       47 阅读
  9. string类的常用方法

    2023-12-10 00:28:04       39 阅读
  10. C++知识点总结(8):尺取法

    2023-12-10 00:28:04       32 阅读
  11. go-factory工厂模式样例

    2023-12-10 00:28:04       37 阅读